-
-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Gateway Intents #1566
Support Gateway Intents #1566
Conversation
Allows supplying gateway intents through DiscordSocketConfig which will be passed through the IDENTIFY payload, in order to choose what gateway events you want to receive.
@@ -517,7 +519,7 @@ private async Task ProcessMessageAsync(GatewayOpCode opCode, int? seq, string ty | |||
_sessionId = null; | |||
_lastSeq = 0; | |||
|
|||
await ApiClient.SendIdentifyAsync(shardID: ShardId, totalShards: TotalShards).ConfigureAwait(false); | |||
await ApiClient.SendIdentifyAsync(shardID: ShardId, totalShards: TotalShards, guildSubscriptions: _guildSubscriptions, gatewayIntents: _gatewayIntents).ConfigureAwait(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was not clear to me why guildSubscriptions was omitted here previously...
From initial testing on my bot I'm seeing about a 25% reduction in CPU usage and ~3.5GB of memory savings (~60K guilds) from trimming down to |
* Support Gateway Intents Allows supplying gateway intents through DiscordSocketConfig which will be passed through the IDENTIFY payload, in order to choose what gateway events you want to receive. * Fixing enum casing * Feedback * Updating comment for GuildSubscriptions * Comment update
Allows supplying gateway intents through DiscordSocketConfig which will be passed through the IDENTIFY payload, in order to choose what gateway events you want to receive.