mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-03 22:12:18 +00:00
@@ -857,10 +857,13 @@ class ConnectionState:
|
|||||||
if thread is not None:
|
if thread is not None:
|
||||||
old = copy.copy(thread)
|
old = copy.copy(thread)
|
||||||
thread._update(data)
|
thread._update(data)
|
||||||
|
if thread.archived:
|
||||||
|
guild._remove_thread(thread)
|
||||||
self.dispatch('thread_update', old, thread)
|
self.dispatch('thread_update', old, thread)
|
||||||
else:
|
else:
|
||||||
thread = Thread(guild=guild, state=guild._state, data=data)
|
thread = Thread(guild=guild, state=guild._state, data=data)
|
||||||
guild._add_thread(thread)
|
if not thread.archived:
|
||||||
|
guild._add_thread(thread)
|
||||||
self.dispatch('thread_join', thread)
|
self.dispatch('thread_join', thread)
|
||||||
|
|
||||||
def parse_thread_delete(self, data: gw.ThreadDeleteEvent) -> None:
|
def parse_thread_delete(self, data: gw.ThreadDeleteEvent) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user