pubsub.lazy_guild: remove member list from guild map too

This commit is contained in:
Luna 2018-12-02 18:41:29 -03:00
parent d1ef08fbd0
commit 300f948ab2
1 changed files with 5 additions and 0 deletions

View File

@ -1342,6 +1342,11 @@ class LazyGuildDispatcher(Dispatcher):
"""Remove a channel from the manager."""
try:
gml = self.state.pop(channel_id)
# remove it from guild map as well
guild_id = gml.guild_id
self.guild_map[guild_id].pop(channel_id)
gml.close()
except KeyError:
pass