From a1ca74f960fec874eaad807cb24a878f9ad58d46 Mon Sep 17 00:00:00 2001 From: NotNite Date: Tue, 21 Sep 2021 18:20:31 -0400 Subject: [PATCH] lazy_guild: remove member properly --- litecord/common/guilds.py | 2 +- litecord/pubsub/lazy_guild.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litecord/common/guilds.py b/litecord/common/guilds.py index b75497e..f9d07eb 100644 --- a/litecord/common/guilds.py +++ b/litecord/common/guilds.py @@ -67,7 +67,7 @@ async def remove_member(guild_id: int, member_id: int): for state in states: await app.dispatcher.channel.unsub(channel_id, state.session_id) - await app.lazy_guild.remove_member(guild_id, user["id"]) + await app.lazy_guild.remove_member(guild_id, int(user["id"])) await app.dispatcher.guild.dispatch( guild_id, ( diff --git a/litecord/pubsub/lazy_guild.py b/litecord/pubsub/lazy_guild.py index 0efe558..9b9dd0c 100644 --- a/litecord/pubsub/lazy_guild.py +++ b/litecord/pubsub/lazy_guild.py @@ -958,7 +958,7 @@ class GuildMemberList: old_idx = self._get_item_index(user_id) # for now, remove any of the users' subscribed states - state_keys = self.state.keys() + state_keys = tuple(self.state.keys()) for session_id in state_keys: state = self._get_state(session_id)