Add raw typing event and fix typing event not working for DMs

This commit is contained in:
Lilly Rose Berner
2022-04-24 04:25:07 +02:00
committed by GitHub
parent e5f3706c02
commit 277d35c9b2
3 changed files with 68 additions and 14 deletions

View File

@ -273,6 +273,9 @@ Channels
If the ``channel`` is a :class:`TextChannel` then the ``user`` parameter
is a :class:`Member`, otherwise it is a :class:`User`.
If the channel or user could not be found in the internal cache this event
will not be called, you may use :func:`on_raw_typing` instead.
This requires :attr:`Intents.typing` to be enabled.
:param channel: The location where the typing originated from.
@ -282,6 +285,18 @@ Channels
:param when: When the typing started as an aware datetime in UTC.
:type when: :class:`datetime.datetime`
.. function:: on_raw_typing(payload)
Called when someone begins typing a message. Unlike :func:`on_typing` this
is called regardless of the channel and user being in the internal cache.
This requires :attr:`Intents.typing` to be enabled.
.. versionadded:: 2.0
:param payload: The raw event payload data.
:type payload: :class:`RawTypingEvent`
Connection
~~~~~~~~~~~
@ -4015,6 +4030,14 @@ RawThreadDeleteEvent
.. autoclass:: RawThreadDeleteEvent()
:members:
RawTypingEvent
~~~~~~~~~~~~~~~~
.. attributetable:: RawTypingEvent
.. autoclass:: RawTypingEvent()
:members:
PartialWebhookGuild
~~~~~~~~~~~~~~~~~~~~