Ejemplo n.º 1
0
        private async Task HelloRecievedSendIdentify(object sender, DataPayload <Hello> payload, CancellationToken cancellationToken)
        {
            logger.LogInformation("Hello Recieved");
            await SendHeartbeat(cancellationToken);

            var sendPayload = new GatewayDataPayload <Identify>
            {
                Data = new Identify
                {
                    GuildSubscriptions = false,
                    Intents            = Intent.GuildMessages | Intent.DirectMessages | Intent.GuildVoiceStates,
                    Token = Configuration["discordtoken"]
                },
                GatewayOpcode = Opcode.Identify
            };
            await client.SendPayload(sendPayload, MaxSendPayload, cancellationToken);
        }