Add VoiceClient.is_paused to query pause state.
This commit is contained in:
parent
55e63ed87f
commit
07d5328873
@ -252,3 +252,6 @@ class AudioPlayer(threading.Thread):
|
||||
|
||||
def is_playing(self):
|
||||
return self._resumed.is_set() and not self._end.is_set()
|
||||
|
||||
def is_paused(self):
|
||||
return not self._end.is_set() and not self._resumed.is_set()
|
||||
|
@ -337,6 +337,10 @@ class VoiceClient:
|
||||
"""Indicates if we're currently playing audio."""
|
||||
return self._player is not None and self._player.is_playing()
|
||||
|
||||
def is_paused(self):
|
||||
"""Indicates if we're playing audio, but if we're paused."""
|
||||
return self._player is not None and self._player.is_paused()
|
||||
|
||||
def stop(self):
|
||||
"""Stops playing audio."""
|
||||
if self._player:
|
||||
|
Loading…
x
Reference in New Issue
Block a user