mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 18:33:02 +00:00
Add raw typing event and fix typing event not working for DMs
This commit is contained in:
committed by
GitHub
parent
e5f3706c02
commit
277d35c9b2
23
docs/api.rst
23
docs/api.rst
@ -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
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
Reference in New Issue
Block a user