lazy_guild: remove member properly

This commit is contained in:
NotNite 2021-09-21 18:20:31 -04:00
parent e35af92cb9
commit a1ca74f960
No known key found for this signature in database
GPG Key ID: BD91A5402CCEB08A
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ async def remove_member(guild_id: int, member_id: int):
for state in states: for state in states:
await app.dispatcher.channel.unsub(channel_id, state.session_id) 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( await app.dispatcher.guild.dispatch(
guild_id, guild_id,
( (

View File

@ -958,7 +958,7 @@ class GuildMemberList:
old_idx = self._get_item_index(user_id) old_idx = self._get_item_index(user_id)
# for now, remove any of the users' subscribed states # 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: for session_id in state_keys:
state = self._get_state(session_id) state = self._get_state(session_id)