aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorkhazhyk <[email protected]>2019-04-14 18:50:28 -0700
committerRapptz <[email protected]>2019-04-17 22:41:59 -0400
commitb1fae0861a6011fb4c37859db2d78f7ceb4a7b13 (patch)
tree1ca32631b6c97efab9f11d5a3daf9d6bc567c617 /discord/client.py
parent[commands] Add new MessageConverter to commands prose page. (diff)
downloaddiscord.py-b1fae0861a6011fb4c37859db2d78f7ceb4a7b13.tar.xz
discord.py-b1fae0861a6011fb4c37859db2d78f7ceb4a7b13.zip
add read-only cached_messages property to Client
For those of us who want access to this sweet trove of zero hop messages
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py
index e0d7900b..2f70082b 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -228,6 +228,14 @@ class Client:
return self._connection.emojis
@property
+ def cached_messages(self):
+ """Sequence[:class:`~discord.Message`]: Read-only list of messages the connected client has cached.
+
+ .. versionadded:: 1.1.0
+ """
+ return utils.SequenceProxy(self._connection._messages)
+
+ @property
def private_channels(self):
"""List[:class:`abc.PrivateChannel`]: The private channels that the connected client is participating on.