aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-04-03 23:08:03 -0400
committerRapptz <[email protected]>2021-04-03 23:08:03 -0400
commitefc30a146e1f487c54a739c1e24ec2806b54bb0e (patch)
treef6fc231ad7bb64e0e7a82d4a60a76be73b314808 /discord
parent[commands] Add missing versionadded on StoreChannelConverter (diff)
downloaddiscord.py-efc30a146e1f487c54a739c1e24ec2806b54bb0e.tar.xz
discord.py-efc30a146e1f487c54a739c1e24ec2806b54bb0e.zip
Guard for `None` in VocalGuildChannel.members
Diffstat (limited to 'discord')
-rw-r--r--discord/channel.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 28739edc..bd4a39dc 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -575,7 +575,7 @@ class VocalGuildChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hasha
"""List[:class:`Member`]: Returns all members that are currently inside this voice channel."""
ret = []
for user_id, state in self.guild._voice_states.items():
- if state.channel.id == self.id:
+ if state.channel and state.channel.id == self.id:
member = self.guild.get_member(user_id)
if member is not None:
ret.append(member)