Fix _get_message returning the message cache.

This commit is contained in:
Lorenzo 2019-08-27 23:44:22 +02:00 committed by Danny
parent 7d7eabb974
commit 828e8189d3

View File

@ -256,7 +256,7 @@ class ConnectionState:
self._private_channels_by_user.pop(channel.recipient.id, None)
def _get_message(self, msg_id):
return self._messages and utils.find(lambda m: m.id == msg_id, reversed(self._messages))
return utils.find(lambda m: m.id == msg_id, reversed(self._messages)) if self._messages else None
def _add_guild_from_data(self, guild):
guild = Guild(data=guild, state=self)