diff options
| author | Rapptz <[email protected]> | 2020-09-04 08:09:41 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-09-23 03:21:16 -0400 |
| commit | 930761e058597b8fd8a5aaf7c747ca78b324bbc9 (patch) | |
| tree | de467405524d48228d7804f5ce1fda71c6f69a45 /discord/gateway.py | |
| parent | Add more close codes that can't be handled for reconnecting. (diff) | |
| download | discord.py-930761e058597b8fd8a5aaf7c747ca78b324bbc9.tar.xz discord.py-930761e058597b8fd8a5aaf7c747ca78b324bbc9.zip | |
Rewrite chunking to work with intents.
This slows down chunking significantly for bots in a large number of
guilds since it goes down from 75 guilds/request to 1 guild/request.
However the logic was rewritten to fire the chunking request
immediately after receiving the GUILD_CREATE rather than waiting for
all the guilds in the ready stream before doing it.
Diffstat (limited to 'discord/gateway.py')
| -rw-r--r-- | discord/gateway.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/gateway.py b/discord/gateway.py index e7274520..ce64c501 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -370,7 +370,7 @@ class DiscordWebSocket: } if state._intents is not None: - payload['d']['intents'] = state._intents + payload['d']['intents'] = state._intents.value await self.call_hooks('before_identify', self.shard_id, initial=self._initial_identify) await self.send_as_json(payload) |