Browse Source

Add VoiceClient.is_paused to query pause state.

pull/546/head
Rapptz 8 years ago
parent
commit
07d5328873
  1. 3
      discord/player.py
  2. 4
      discord/voice_client.py

3
discord/player.py

@ -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()

4
discord/voice_client.py

@ -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…
Cancel
Save