From 2cb5ce981e9c81e76ce6a12e0665181c40d78f30 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 31 Jul 2021 19:43:05 -0400 Subject: [PATCH] FIx on_thread_member_remove passing in None --- discord/state.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord/state.py b/discord/state.py index 6425a1dfa..3f5773296 100644 --- a/discord/state.py +++ b/discord/state.py @@ -864,7 +864,8 @@ class ConnectionState: for member_id in removed_member_ids: if member_id != self_id: member = thread._pop_member(member_id) - self.dispatch('thread_member_remove', member) + if member is not None: + self.dispatch('thread_member_remove', member) else: self.dispatch('thread_remove', thread)