mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-26 02:53:07 +00:00
Working multi-server voice support.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user