add stub for op 24

This commit is contained in:
Luna 2021-08-29 19:19:33 -03:00
parent 331d316feb
commit 9d557e2817
2 changed files with 17 additions and 0 deletions

View File

@ -48,3 +48,4 @@ class OP:
LAZY_REQUEST = 14
UNKNOWN_1 = 23
UNKNOWN_2 = 24

View File

@ -1212,6 +1212,22 @@ class GatewayWebsocket:
# TODO reverse-engineer opcode 23, sent by client
pass
async def handle_24(self, payload):
"""OP 24 Guild Application Commands Request"""
data = payload["d"]
# stubbed
await self.dispatch(
"GUILD_APPLICATION_COMMANDS_UPDATE",
{
"updated_at": 1630271377245,
"nonce": data["nonce"],
"guild_id": data["guild_id"],
"applications": [],
"application_commands": [],
},
)
async def _process_message(self, payload):
"""Process a single message coming in from the client."""
try: