Implement a LRU cache for private channels.

Another fix related to the discord issue[1].

[1]: https://github.com/hammerandchisel/discord-api-docs/issues/184
This commit is contained in:
Rapptz
2017-07-04 20:01:27 -04:00
parent 169f3a8322
commit 3bd0c2120c
2 changed files with 27 additions and 5 deletions

View File

@ -179,7 +179,13 @@ class Client:
@property
def private_channels(self):
"""List[:class:`abc.PrivateChannel`]: The private channels that the connected client is participating on."""
"""List[:class:`abc.PrivateChannel`]: The private channels that the connected client is participating on.
.. note::
This returns only up to 128 most recent private channels due to an internal working
on how Discord deals with private channels.
"""
return self._connection.private_channels
@property