mirror of https://gitlab.com/litecord/litecord.git
gateway.websocket: add implementation for _handle_3
- gateway.websocket: add dummy implementation for _handle_5
This commit is contained in:
parent
dd4ae44080
commit
213eb328b2
|
|
@ -4,13 +4,21 @@ class OP:
|
||||||
HEARTBEAT = 1
|
HEARTBEAT = 1
|
||||||
IDENTIFY = 2
|
IDENTIFY = 2
|
||||||
STATUS_UPDATE = 3
|
STATUS_UPDATE = 3
|
||||||
|
|
||||||
|
# voice connection / disconnection
|
||||||
VOICE_UPDATE = 4
|
VOICE_UPDATE = 4
|
||||||
VOICE_PING = 5
|
VOICE_PING = 5
|
||||||
|
|
||||||
RESUME = 6
|
RESUME = 6
|
||||||
RECONNECT = 7
|
RECONNECT = 7
|
||||||
REQ_GUILD_MEMBERS = 8
|
REQ_GUILD_MEMBERS = 8
|
||||||
INVALID_SESSION = 9
|
INVALID_SESSION = 9
|
||||||
|
|
||||||
HELLO = 10
|
HELLO = 10
|
||||||
HEARTBEAT_ACK = 11
|
HEARTBEAT_ACK = 11
|
||||||
|
|
||||||
|
# request member / presence information
|
||||||
GUILD_SYNC = 12
|
GUILD_SYNC = 12
|
||||||
UNKNOWN = 14
|
|
||||||
|
# request for lazy guilds
|
||||||
|
LAZY_REQUEST = 14
|
||||||
|
|
|
||||||
|
|
@ -355,12 +355,30 @@ class GatewayWebsocket:
|
||||||
|
|
||||||
async def handle_3(self, payload: Dict[str, Any]):
|
async def handle_3(self, payload: Dict[str, Any]):
|
||||||
"""Handle OP 3 Status Update."""
|
"""Handle OP 3 Status Update."""
|
||||||
pass
|
presence = payload['d']
|
||||||
|
|
||||||
|
# update_status will take care of validation and
|
||||||
|
# setting new presence to state
|
||||||
|
await self.update_status(presence)
|
||||||
|
|
||||||
async def handle_4(self, payload: Dict[str, Any]):
|
async def handle_4(self, payload: Dict[str, Any]):
|
||||||
"""Handle OP 4 Voice Status Update."""
|
"""Handle OP 4 Voice Status Update."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
async def _handle_5(self, payload: Dict[str, Any]):
|
||||||
|
"""Handle OP 5 Voice Server Ping.
|
||||||
|
|
||||||
|
packet's d structure:
|
||||||
|
|
||||||
|
{
|
||||||
|
delay: num,
|
||||||
|
speaking: num,
|
||||||
|
ssrc: num
|
||||||
|
}
|
||||||
|
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
async def handle_6(self, payload: Dict[str, Any]):
|
async def handle_6(self, payload: Dict[str, Any]):
|
||||||
"""Handle OP 6 Resume."""
|
"""Handle OP 6 Resume."""
|
||||||
data = payload['d']
|
data = payload['d']
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue