feat: identify, presence update commands

This commit is contained in:
sam 2024-09-03 02:11:11 +02:00
parent b3bf3a7c16
commit 6c335568f5
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
11 changed files with 194 additions and 68 deletions

View file

@ -1,4 +1,7 @@
using Foxcord.Gateway;
using Foxcord.Gateway.Events;
using Foxcord.Gateway.Events.Commands;
using Foxcord.Models;
using Serilog;
using Foxcord.Rest;
@ -18,7 +21,15 @@ var gateway = new DiscordGatewayClient(Log.Logger, new DiscordGatewayClientOptio
{
Token = Environment.GetEnvironmentVariable("TOKEN")!,
Uri = gatewayBot.Url,
Intents = GatewayIntent.Guilds | GatewayIntent.GuildMessages | GatewayIntent.MessageContent
Intents = GatewayIntent.Guilds | GatewayIntent.GuildMessages | GatewayIntent.MessageContent,
InitialPresence = new PresenceUpdateCommand
{
Activities = [new Activity("balls", ActivityType.Custom, State: "gay gay homosexual gay")]
},
IdentifyProperties = new IdentifyProperties
{
Browser = "Discord iOS"
}
});
await gateway.ConnectAsync();