From be14fd1dcc49b2806b3275b91cb74a8803de1c32 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 16 Oct 2015 15:52:11 -0400 Subject: Add Channel.voice_members This allows you to see which members are currently in a voice channel. --- discord/channel.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'discord/channel.py') diff --git a/discord/channel.py b/discord/channel.py index 74d74001..ee276f58 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -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') -- cgit v1.2.3