Userbots do not have a DM cache cap limit.

This commit is contained in:
Rapptz 2018-04-02 00:42:14 -04:00
parent 95de4d1df1
commit 3cb6ac152e

View File

@ -213,7 +213,7 @@ class ConnectionState:
channel_id = channel.id
self._private_channels[channel_id] = channel
if len(self._private_channels) > 128:
if self.is_bot and len(self._private_channels) > 128:
_, to_remove = self._private_channels.popitem(last=False)
if isinstance(to_remove, DMChannel):
self._private_channels_by_user.pop(to_remove.recipient.id, None)