From e96df33ce0bf6ff0f4e738d897141cfd006c6ebf Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 28 Jun 2021 18:56:28 -0400 Subject: [PATCH] Dispatch thread_join when a thread is updated but not in cache --- discord/state.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord/state.py b/discord/state.py index 243f2b7bd..e87d1ab12 100644 --- a/discord/state.py +++ b/discord/state.py @@ -734,6 +734,10 @@ class ConnectionState: old = copy.copy(thread) thread._update(data) self.dispatch('thread_update', old, thread) + else: + thread = Thread(guild=guild, data=data) + guild._add_thread(thread) + self.dispatch('thread_join', thread) def parse_thread_delete(self, data): guild_id = int(data['guild_id'])