From ebf16754af897c866c297f7b2e45dd89d34a4c59 Mon Sep 17 00:00:00 2001 From: Luna Mendes Date: Wed, 10 Oct 2018 18:21:18 -0300 Subject: [PATCH] gateway.opcodes: add CALL_SYNC - gateway.websocket: add dummy handler for CALL_SYNC --- litecord/gateway/opcodes.py | 3 +++ litecord/gateway/websocket.py | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/litecord/gateway/opcodes.py b/litecord/gateway/opcodes.py index c07914b..8e91ead 100644 --- a/litecord/gateway/opcodes.py +++ b/litecord/gateway/opcodes.py @@ -20,5 +20,8 @@ class OP: # request member / presence information GUILD_SYNC = 12 + # request to sync up call dm / group dm + CALL_SYNC = 13 + # request for lazy guilds LAZY_REQUEST = 14 diff --git a/litecord/gateway/websocket.py b/litecord/gateway/websocket.py index 0081fc0..2b53cc1 100644 --- a/litecord/gateway/websocket.py +++ b/litecord/gateway/websocket.py @@ -583,6 +583,20 @@ class GatewayWebsocket: await self._guild_sync(guild_id) + async def handle_13(self, payload: Dict[str, Any]): + """Handle CALL_SYNC request. + + There isn't any need to actually finish the implementation + since we don't have voice. Discord doesn't seem to send anything + on text-only DMs, so I'll keep that behavior and do nothing. + + CALL_SYNC structure (for now, we don't know if there is anything else): + { + channel_id: snowflake + } + """ + pass + async def handle_14(self, payload: Dict[str, Any]): """Lazy guilds handler.