aboutsummaryrefslogtreecommitdiff
path: root/discord/voice_client.py
diff options
context:
space:
mode:
authorDaniel <[email protected]>2019-04-09 00:05:40 -0400
committerRapptz <[email protected]>2019-04-09 00:14:41 -0400
commit3a36f78e081f1dca747124f6b5b836d6f5e8db11 (patch)
tree36a47fda16bf02bf3fcf61d580311e85765b8f35 /discord/voice_client.py
parentFix broken documentation attribute (diff)
downloaddiscord.py-3a36f78e081f1dca747124f6b5b836d6f5e8db11.tar.xz
discord.py-3a36f78e081f1dca747124f6b5b836d6f5e8db11.zip
Use is_connected() instead of _connected in checks
Was doing a falsy check on an Event object instead of using the (unused) is_connected() function.
Diffstat (limited to 'discord/voice_client.py')
-rw-r--r--discord/voice_client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py
index 80ed9b76..82affab4 100644
--- a/discord/voice_client.py
+++ b/discord/voice_client.py
@@ -261,7 +261,7 @@ class VoiceClient:
Disconnects this voice client from voice.
"""
- if not force and not self._connected.is_set():
+ if not force and not self.is_connected():
return
self.stop()
@@ -348,7 +348,7 @@ class VoiceClient:
source is not a :class:`AudioSource` or after is not a callable.
"""
- if not self._connected:
+ if not self.is_connected():
raise ClientException('Not connected to voice.')
if self.is_playing():