From 3a36f78e081f1dca747124f6b5b836d6f5e8db11 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 9 Apr 2019 00:05:40 -0400 Subject: [PATCH] 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. --- discord/voice_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/voice_client.py b/discord/voice_client.py index 80ed9b76d..82affab47 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():