Add Channel.voice_members

This allows you to see which members are currently in a voice
channel.
This commit is contained in:
Rapptz
2015-10-16 15:52:11 -04:00
parent 411b477a02
commit be14fd1dcc
2 changed files with 14 additions and 0 deletions

View File

@ -56,10 +56,15 @@ class Channel(object):
An array of :class:`Roles` that have been overridden from their default
values in the :attr:`Server.roles` attribute.
.. attribute:: voice_members
An array of :class:`Members` that are currently inside this voice channel.
If :attr:`type` is not ``'voice'`` then this is always an empty array.
"""
def __init__(self, **kwargs):
self.update(**kwargs)
self.voice_members = []
def update(self, **kwargs):
self.name = kwargs.get('name')