aboutsummaryrefslogtreecommitdiff
path: root/discord/guild.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-01-08 04:31:33 -0500
committerRapptz <[email protected]>2017-01-08 04:31:33 -0500
commitaae8b783e9f0005e1cc5a51f7acad9d3d6282f30 (patch)
treeb4b8dd52601ce6968fb61b47699fe72200ae1fb6 /discord/guild.py
parentFix bug that caused Guild instances to be in VoiceChannel.voice_members (diff)
downloaddiscord.py-aae8b783e9f0005e1cc5a51f7acad9d3d6282f30.tar.xz
discord.py-aae8b783e9f0005e1cc5a51f7acad9d3d6282f30.zip
VoiceChannel.voice_members is now computed when needed.
Diffstat (limited to 'discord/guild.py')
-rw-r--r--discord/guild.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/discord/guild.py b/discord/guild.py
index 7033bff6..dba9c6b9 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -164,23 +164,6 @@ class Guild(Hashable):
self._voice_states[user_id] = after
member = self.get_member(user_id)
- if member is not None:
- old = before.channel
- # update the references pointed to by the voice channels
- if old is None and channel is not None:
- # we joined a channel
- channel.voice_members.append(member)
- elif old is not None:
- try:
- # we either left a channel or switched channels
- old.voice_members.remove(member)
- except ValueError:
- pass
- finally:
- # we switched channels
- if channel is not None:
- channel.voice_members.append(member)
-
return member, before, after
def _add_role(self, role):