Add support for guild intents

This commit is contained in:
Rapptz
2019-12-20 23:10:46 -05:00
parent 9036b9651b
commit a6381dcf77
4 changed files with 331 additions and 1 deletions

View File

@ -343,6 +343,9 @@ class DiscordWebSocket:
'afk': False
}
if state._intents is not None:
payload['d']['intents'] = state._intents
await self.call_hooks('before_identify', self.shard_id, initial=self._initial_identify)
await self.send_as_json(payload)
log.info('Shard ID %s has sent the IDENTIFY payload.', self.shard_id)