diff options
Diffstat (limited to 'discord/voice_client.py')
| -rw-r--r-- | discord/voice_client.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py index 26b353cc..4079138f 100644 --- a/discord/voice_client.py +++ b/discord/voice_client.py @@ -158,6 +158,9 @@ class VoiceClient: The endpoint we are connecting to. channel : :class:`Channel` The voice channel connected to. + server : :class:`Server` + The server the voice channel is connected to. + Shorthand for ``channel.server``. loop The event loop that the voice client is running on. """ @@ -176,6 +179,10 @@ class VoiceClient: self.encoder = OpusEncoder(48000, 2) log.info('created opus encoder with {0.__dict__}'.format(self.encoder)) + @property + def server(self): + return self.channel.server + def checked_add(self, attr, value, limit): val = getattr(self, attr) if val + value > limit: |