Add cached_message to on_raw_message_edit event

Also add documentation for this behavior
This commit is contained in:
Vexs
2019-04-09 09:37:58 -05:00
committed by Rapptz
parent 792b31833a
commit 82a39eb148
3 changed files with 12 additions and 3 deletions

View File

@ -86,14 +86,17 @@ class RawMessageUpdateEvent:
The message ID that got updated.
data: :class:`dict`
The raw data given by the
`gateway <https://discordapp.com/developers/docs/topics/gateway#message-update>`_
`gateway <https://discordapp.com/developers/docs/topics/gateway#message-update>`
cached_message: Optional[:class:`Message`]
The cached message, if found in the internal message cache.
"""
__slots__ = ('message_id', 'data')
__slots__ = ('message_id', 'data', 'cached_message')
def __init__(self, data):
self.message_id = int(data['id'])
self.data = data
self.cached_message = None
class RawReactionActionEvent:
"""Represents the payload for a :func:`on_raw_reaction_add` or