From a47ded6e4947fc1f96c9368817e08683654a5802 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 26 May 2017 07:17:52 -0400 Subject: Don't expose Client.messages Not entirely sure why it was exposed in the first place. Most uses with it essentially boiled down to mis-usage when they meant to use the /messages endpoint (via Client.logs_from or Messageable.history) or complaining about the partial data woes that came from it. --- discord/client.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'discord/client.py') diff --git a/discord/client.py b/discord/client.py index 399cc7b4..56c1a7e4 100644 --- a/discord/client.py +++ b/discord/client.py @@ -66,7 +66,6 @@ class Client: A number of options can be passed to the :class:`Client`. - .. _deque: https://docs.python.org/3.4/library/collections.html#collections.deque .. _event loop: https://docs.python.org/3/library/asyncio-eventloops.html .. _connector: http://aiohttp.readthedocs.org/en/stable/client_reference.html#connectors .. _ProxyConnector: http://aiohttp.readthedocs.org/en/stable/client_reference.html#proxyconnector @@ -74,7 +73,7 @@ class Client: Parameters ---------- max_messages : Optional[int] - The maximum number of messages to store in :attr:`messages`. + The maximum number of messages to store in the internal message cache. This defaults to 5000. Passing in `None` or a value less than 100 will use the default instead of the passed in value. loop : Optional[event loop] @@ -183,16 +182,6 @@ class Client: """List[:class:`abc.PrivateChannel`]: The private channels that the connected client is participating on.""" return self._connection.private_channels - @property - def messages(self): - """A deque_ of :class:`Message` that the client has received from all - guilds and private messages. - - The number of messages stored in this deque is controlled by the - ``max_messages`` parameter. - """ - return self._connection.messages - @property def voice_clients(self): """List[:class:`VoiceClient`]: Represents a list of voice connections.""" -- cgit v1.2.3