aboutsummaryrefslogtreecommitdiff
path: root/discord/raw_models.py
diff options
context:
space:
mode:
Diffstat (limited to 'discord/raw_models.py')
-rw-r--r--discord/raw_models.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/discord/raw_models.py b/discord/raw_models.py
index adacbd85..211216af 100644
--- a/discord/raw_models.py
+++ b/discord/raw_models.py
@@ -35,14 +35,16 @@ class RawMessageDeleteEvent:
The guild ID where the deletion took place, if applicable.
message_id: :class:`int`
The message ID that got deleted.
+ cached_message: Optional[:class:`Message`]
+ The cached message, if found in the internal message cache.
"""
- __slots__ = ('message_id', 'channel_id', 'guild_id')
+ __slots__ = ('message_id', 'channel_id', 'guild_id', 'cached_message')
def __init__(self, data):
self.message_id = int(data['id'])
self.channel_id = int(data['channel_id'])
-
+ self.cached_message = None
try:
self.guild_id = int(data['guild_id'])
except KeyError:
@@ -59,13 +61,16 @@ class RawBulkMessageDeleteEvent:
The channel ID where the message got deleted.
guild_id: Optional[:class:`int`]
The guild ID where the message got deleted, if applicable.
+ cached_messages: List[:class:`Message`]
+ The cached messages, if found in the internal message cache.
"""
- __slots__ = ('message_ids', 'channel_id', 'guild_id')
+ __slots__ = ('message_ids', 'channel_id', 'guild_id', 'cached_messages')
def __init__(self, data):
self.message_ids = {int(x) for x in data.get('ids', [])}
self.channel_id = int(data['channel_id'])
+ self.cached_messages = []
try:
self.guild_id = int(data['guild_id'])