Add support for voice channel user limits.

This commit is contained in:
Rapptz
2016-05-20 17:55:58 -04:00
parent 492c9afffb
commit fe1b5b2941
2 changed files with 16 additions and 1 deletions

View File

@ -80,6 +80,8 @@ class Channel(Hashable):
voice_members
A list of :class:`Members` that are currently inside this voice channel.
If :attr:`type` is not :attr:`ChannelType.voice` then this is always an empty array.
user_limit : int
The channel's limit for number of members that can be in a voice channel.
"""
def __init__(self, **kwargs):
@ -98,6 +100,7 @@ class Channel(Hashable):
self.position = kwargs.get('position')
self.bitrate = kwargs.get('bitrate')
self.type = kwargs.get('type')
self.user_limit = kwargs.get('user_limit')
try:
self.type = ChannelType(self.type)
except: