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 committed 2017-07-04 20:02:17 -04:00
1 parent 169f3a8322
commit 3bd0c2120c
2 files changed
+27 -5

No files matched your search

+7 -1
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