diff options
| author | Rapptz <[email protected]> | 2019-07-15 07:56:35 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-07-15 07:56:48 -0400 |
| commit | 5b2f630848f42940d62ce7af5ee1484a39259ceb (patch) | |
| tree | 81302fa9ad7c7282b9c0fb76b246a2b9772db2b9 /discord/gateway.py | |
| parent | Allow complete disabling of the member cache. (diff) | |
| download | discord.py-5b2f630848f42940d62ce7af5ee1484a39259ceb.tar.xz discord.py-5b2f630848f42940d62ce7af5ee1484a39259ceb.zip | |
Add Guild.query_members to fetch members from the gateway.
Diffstat (limited to 'discord/gateway.py')
| -rw-r--r-- | discord/gateway.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/discord/gateway.py b/discord/gateway.py index 7d71425b..6848f120 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -517,6 +517,17 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol): } await self.send_as_json(payload) + async def request_chunks(self, guild_id, query, limit): + payload = { + 'op': self.REQUEST_MEMBERS, + 'd': { + 'guild_id': str(guild_id), + 'query': query, + 'limit': limit + } + } + await self.send_as_json(payload) + async def voice_state(self, guild_id, channel_id, self_mute=False, self_deaf=False): payload = { 'op': self.VOICE_STATE, |