mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Add new on_thread_create event
This commit is contained in:
15
docs/api.rst
15
docs/api.rst
@ -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`.
|
||||
|
||||
|
Reference in New Issue
Block a user