Add Rich Presence

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2023-12-18 16:43:02 +03:00
parent 24e3a4badb
commit a106d19435
Signed by: mctaylors
GPG key ID: 7181BEBE676903C1

View file

@ -6,6 +6,9 @@ using Microsoft.Extensions.Logging;
using Cassette.Commands;
using Remora.Commands.Extensions;
using Remora.Discord.API.Abstractions.Gateway.Commands;
using Remora.Discord.API.Abstractions.Objects;
using Remora.Discord.API.Gateway.Commands;
using Remora.Discord.API.Objects;
using Remora.Discord.Commands.Extensions;
using Remora.Discord.Commands.Services;
using Remora.Discord.Gateway;
@ -61,6 +64,11 @@ file class Cassette
|= GatewayIntents.MessageContents
| GatewayIntents.GuildVoiceStates
| GatewayIntents.Guilds;
g.Presence = new UpdatePresence(
UserStatus.Online, false, null, new List<IActivity>
{
new Activity("Cassette Tapes", ActivityType.Listening)
});
});
services
.AddDiscordCommands(true, false)