aboutsummaryrefslogtreecommitdiff
path: root/discord/gateway.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-07-15 07:56:35 -0400
committerRapptz <[email protected]>2019-07-15 07:56:48 -0400
commit5b2f630848f42940d62ce7af5ee1484a39259ceb (patch)
tree81302fa9ad7c7282b9c0fb76b246a2b9772db2b9 /discord/gateway.py
parentAllow complete disabling of the member cache. (diff)
downloaddiscord.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.py11
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,