gateway.websocket: fix extracting guild ids when handling op 8

This commit is contained in:
Luna Mendes 2018-11-18 01:24:32 -03:00
parent 500579e957
commit 9db9c75602
2 changed files with 3 additions and 3 deletions

View File

@ -194,8 +194,6 @@ async def create_message(channel_id):
for mention in payload['mentions']:
uid = int(mention['id'])
print('updating user read state', repr(uid), repr(channel_id))
await app.db.execute("""
UPDATE user_read_state
SET mention_count = mention_count + 1

View File

@ -635,9 +635,11 @@ class GatewayWebsocket:
'members': result
})
async def handle_8(self, data: Any):
async def handle_8(self, payload: Dict):
"""Handle OP 8 Request Guild Members."""
data = payload['d']
gids = data['guild_id']
uids, query, limit = data.get('user_ids', []), \
data.get('query', ''), \
data.get('limit', 0)