Implement VoiceProtocol lower level hooks.

This allows changing the connect flow and taking control of it without
relying on internal events or tricks.
This commit is contained in:
Rapptz
2020-08-10 06:28:36 -04:00
parent 93fa46713a
commit 0b93fa3a82
9 changed files with 230 additions and 106 deletions

View File

@ -292,6 +292,7 @@ class AutoShardedClient(Client):
# the key is the shard_id
self.__shards = {}
self._connection._get_websocket = self._get_websocket
self._connection._get_client = lambda: self
self.__queue = asyncio.PriorityQueue()
def _get_websocket(self, guild_id=None, *, shard_id=None):