mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-04 22:42:21 +00:00
Add raw thread delete event
This commit is contained in:
committed by
GitHub
parent
222dd3cf5b
commit
3e8fa5a661
@@ -886,8 +886,10 @@ class ConnectionState:
|
||||
_log.debug('THREAD_DELETE referencing an unknown guild ID: %s. Discarding', guild_id)
|
||||
return
|
||||
|
||||
thread_id = int(data['id'])
|
||||
thread = guild.get_thread(thread_id)
|
||||
raw = RawThreadDeleteEvent(data)
|
||||
raw.thread = thread = guild.get_thread(raw.thread_id)
|
||||
self.dispatch('raw_thread_delete', raw)
|
||||
|
||||
if thread is not None:
|
||||
guild._remove_thread(thread)
|
||||
self.dispatch('thread_delete', thread)
|
||||
|
||||
Reference in New Issue
Block a user