mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-03 14:02:19 +00:00
Add new on_thread_create event
This commit is contained in:
@@ -850,7 +850,10 @@ class ConnectionState:
|
||||
has_thread = guild.get_thread(thread.id)
|
||||
guild._add_thread(thread)
|
||||
if not has_thread:
|
||||
self.dispatch('thread_join', thread)
|
||||
if data.get('newly_created'):
|
||||
self.dispatch('thread_create', thread)
|
||||
else:
|
||||
self.dispatch('thread_join', thread)
|
||||
|
||||
def parse_thread_update(self, data: gw.ThreadUpdateEvent) -> None:
|
||||
guild_id = int(data['guild_id'])
|
||||
|
||||
Reference in New Issue
Block a user