Add on_raw_thread_update event

This commit is contained in:
Enes Kurbetoğlu
2022-06-03 11:49:32 +03:00
committed by GitHub
parent af265dba06
commit 06c1f44d74
3 changed files with 62 additions and 3 deletions

View File

@ -874,8 +874,9 @@ class ConnectionState:
_log.debug('THREAD_UPDATE referencing an unknown guild ID: %s. Discarding', guild_id)
return
thread_id = int(data['id'])
thread = guild.get_thread(thread_id)
raw = RawThreadUpdateEvent(data)
raw.thread = thread = guild.get_thread(raw.thread_id)
self.dispatch('raw_thread_update', raw)
if thread is not None:
old = copy.copy(thread)
thread._update(data)