Add VoiceClient.source to get the AudioSource being played.

This commit is contained in:
Rapptz 2017-04-19 01:19:39 -04:00
parent efd6d11e9a
commit 55e63ed87f

View File

@ -353,6 +353,11 @@ class VoiceClient:
if self._player:
self._player.resume()
@property
def source(self):
"""Optional[:class:`AudioSource`]: The audio source being played, if playing."""
return self._player.source if self._player else None
def send_audio_packet(self, data, *, encode=True):
"""Sends an audio packet composed of the data.