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.
This commit is contained in:
Rapptz
2017-05-26 07:17:52 -04:00
parent 9074bea234
commit a47ded6e49
3 changed files with 10 additions and 19 deletions

View File

@ -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."""