mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
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.
This commit is contained in:
parent
db340fd5f9
commit
3a36f78e08
@ -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():
|
||||
|
Loading…
x
Reference in New Issue
Block a user