private async Task AuthorizeAsync()
 {
     IdentifyProperties properties        = new IdentifyProperties("SinkholesImpl", "SinkholesDevice");
     IActivity          presencesActivity = Activity.CreateGamingActivity("SomeShit");
     IdentifyPresence   presences         = new IdentifyPresence(UserStatus.Online, false, null, presencesActivity);
     Identify           identityObj       = new Identify(botToken, properties, IdentifyIntents.None, presences);
     GatewayPayload     payload           = new GatewayPayload(Opcode.Identify, identityObj);
     await gateway.SendAsync(payload, false, WebSocketMessageType.Text, CancellationToken.None);
 }
Beispiel #2
0
 public Identify(string token,
                 IdentifyProperties properties,
                 IdentifyIntents intents    = null,
                 IdentifyPresence presences = null,
                 int[] shards            = null,
                 bool compress           = false,
                 int largeThreshold      = 50,
                 bool guildSubscriptions = true)
 {
     Presences  = presences;
     Properties = properties;
     Token      = token;
     //Shard = shards ?? new int[2] { 0, 1 };
     Intents            = intents?.Intents;
     Compress           = compress;
     LargeThreshold     = largeThreshold;
     GuildSubscriptions = guildSubscriptions;
 }