mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Fix channel deletion not removing associated threads
This commit is contained in:
committed by
GitHub
parent
0b4263e697
commit
0ee1794c6d
@ -831,6 +831,12 @@ class ConnectionState(Generic[ClientT]):
|
||||
guild._scheduled_events.pop(s.id)
|
||||
self.dispatch('scheduled_event_delete', s)
|
||||
|
||||
threads = guild._remove_threads_by_channel(channel_id)
|
||||
|
||||
for thread in threads:
|
||||
self.dispatch('thread_delete', thread)
|
||||
self.dispatch('raw_thread_delete', RawThreadDeleteEvent._from_thread(thread))
|
||||
|
||||
def parse_channel_update(self, data: gw.ChannelUpdateEvent) -> None:
|
||||
channel_type = try_enum(ChannelType, data.get('type'))
|
||||
channel_id = int(data['id'])
|
||||
|
Reference in New Issue
Block a user