mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Clarify on_raw_message_edit cached message nature
This commit is contained in:
parent
d752916995
commit
050bf74f5d
@ -97,7 +97,8 @@ class RawMessageUpdateEvent(_RawReprMixin):
|
|||||||
data: :class:`dict`
|
data: :class:`dict`
|
||||||
The raw data given by the `gateway <https://discord.com/developers/docs/topics/gateway#message-update>`_
|
The raw data given by the `gateway <https://discord.com/developers/docs/topics/gateway#message-update>`_
|
||||||
cached_message: Optional[:class:`Message`]
|
cached_message: Optional[:class:`Message`]
|
||||||
The cached message, if found in the internal message cache.
|
The cached message, if found in the internal message cache. Represents the message before
|
||||||
|
it is modified by the data in :attr:`RawMessageUpdateEvent.data`.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ('message_id', 'channel_id', 'data', 'cached_message')
|
__slots__ = ('message_id', 'channel_id', 'data', 'cached_message')
|
||||||
|
@ -448,7 +448,10 @@ to handle it, which defaults to print a traceback and ignoring the exception.
|
|||||||
regardless of the state of the internal message cache.
|
regardless of the state of the internal message cache.
|
||||||
|
|
||||||
If the message is found in the message cache,
|
If the message is found in the message cache,
|
||||||
it can be accessed via :attr:`RawMessageUpdateEvent.cached_message`
|
it can be accessed via :attr:`RawMessageUpdateEvent.cached_message`. The cached message represents
|
||||||
|
the message before it has been edited. For example, if the content of a message is modified and
|
||||||
|
triggers the :func:`on_raw_message_edit` coroutine, the :attr:`RawMessageUpdateEvent.cached_message`
|
||||||
|
will return a :class:`Message` object that represents the message before the content was modified.
|
||||||
|
|
||||||
Due to the inherently raw nature of this event, the data parameter coincides with
|
Due to the inherently raw nature of this event, the data parameter coincides with
|
||||||
the raw data given by the `gateway <https://discord.com/developers/docs/topics/gateway#message-update>`_.
|
the raw data given by the `gateway <https://discord.com/developers/docs/topics/gateway#message-update>`_.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user