aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-08-10 06:28:36 -0400
committerRapptz <[email protected]>2020-09-23 03:20:35 -0400
commit0b93fa3a82e8b1b1d9f637e7be0333efd0a232b2 (patch)
treeac2beaa72be9a4f47d4a7e1cff6e251db417b61b /discord/client.py
parentFix and add documentation (diff)
downloaddiscord.py-0b93fa3a82e8b1b1d9f637e7be0333efd0a232b2.tar.xz
discord.py-0b93fa3a82e8b1b1d9f637e7be0333efd0a232b2.zip
Implement VoiceProtocol lower level hooks.
This allows changing the connect flow and taking control of it without relying on internal events or tricks.
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py
index 9bc5dd12..407fd47f 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -238,6 +238,7 @@ class Client:
self._closed = False
self._ready = asyncio.Event()
self._connection._get_websocket = self._get_websocket
+ self._connection._get_client = lambda: self
if VoiceClient.warn_nacl:
VoiceClient.warn_nacl = False
@@ -299,7 +300,10 @@ class Client:
@property
def voice_clients(self):
- """List[:class:`.VoiceClient`]: Represents a list of voice connections."""
+ """List[:class:`.VoiceProtocol`]: Represents a list of voice connections.
+
+ These are usually :class:`.VoiceClient` instances.
+ """
return self._connection.voice_clients
def is_ready(self):