aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-01-13 01:11:32 -0500
committerRapptz <[email protected]>2017-01-13 01:11:32 -0500
commit793cbedd0dc2cd8875aff3ff403b99d4873e8582 (patch)
tree45fe3f812c6632926a1db35f557ac9c3a465dd89
parentFix 404s with Client.pins_from and Client.create_role. (diff)
downloaddiscord.py-793cbedd0dc2cd8875aff3ff403b99d4873e8582.tar.xz
discord.py-793cbedd0dc2cd8875aff3ff403b99d4873e8582.zip
Fix case where on_reaction_add returned None in PMs with users.
-rw-r--r--discord/state.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/state.py b/discord/state.py
index 60e9e5f5..05ac8f14 100644
--- a/discord/state.py
+++ b/discord/state.py
@@ -689,6 +689,8 @@ class ConnectionState:
def _get_member(self, channel, id):
if channel.is_private:
+ if id == self.user.id:
+ return self.user
return utils.get(channel.recipients, id=id)
else:
return channel.server.get_member(id)