Add on_raw_thread_update event

This commit is contained in:
Enes Kurbetoğlu
2022-06-03 11:49:32 +03:00
committed by GitHub
parent af265dba06
commit 06c1f44d74
3 changed files with 62 additions and 3 deletions

View File

@ -1176,7 +1176,11 @@ Threads
.. function:: on_thread_update(before, after)
Called whenever a thread is updated.
Called whenever a thread is updated. If the thread could
not be found in the internal cache this event will not be called.
Threads will not be in the cache if they are archived.
If you need this information use :func:`on_raw_thread_update` instead.
This requires :attr:`Intents.guilds` to be enabled.
@ -1224,6 +1228,18 @@ Threads
:param thread: The thread that got deleted.
:type thread: :class:`Thread`
.. function:: on_raw_thread_update(payload)
Called whenever a thread is update. Unlike :func:`on_thread_update` this
is called regardless of the thread being in the internal thread cache or not.
This requires :attr:`Intents.guilds` to be enabled.
.. versionadded:: 2.0
:param payload: The raw event payload data.
:type payload: :class:`RawThreadUpdateEvent`
.. function:: on_raw_thread_delete(payload)
Called whenever a thread is deleted. Unlike :func:`on_thread_delete` this
@ -4119,6 +4135,14 @@ RawIntegrationDeleteEvent
.. autoclass:: RawIntegrationDeleteEvent()
:members:
RawThreadUpdateEvent
~~~~~~~~~~~~~~~~~~~~~~
.. attributetable:: RawThreadUpdateEvent
.. autoclass:: RawThreadUpdateEvent()
:members:
RawThreadDeleteEvent
~~~~~~~~~~~~~~~~~~~~~~