Add new on_thread_create event

This commit is contained in:
Josh
2022-04-04 21:22:21 +10:00
committed by GitHub
parent b561024163
commit deb7958797
4 changed files with 24 additions and 3 deletions

View File

@ -1096,11 +1096,22 @@ Stages
Threads
~~~~~~~~
.. function:: on_thread_create(thread)
Called whenever a thread is created.
Note that you can get the guild from :attr:`Thread.guild`.
This requires :attr:`Intents.guilds` to be enabled.
.. versionadded:: 2.0
:param thread: The thread that was created.
:type thread: :class:`Thread`
.. function:: on_thread_join(thread)
Called whenever a thread is joined or created. Note that from the API's perspective there is no way to
differentiate between a thread being created or the bot joining a thread.
Called whenever a thread is joined.
Note that you can get the guild from :attr:`Thread.guild`.