From 8caa088d259b8640ed6429bc21bdebebf8443c74 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 2 Jul 2017 01:43:33 -0400 Subject: Allow PartialReactionEmoji in add_reaction and remove_reaction. --- discord/emoji.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'discord/emoji.py') diff --git a/discord/emoji.py b/discord/emoji.py index 0c161c6c..a959bea8 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -80,6 +80,11 @@ class PartialReactionEmoji(namedtuple('PartialReactionEmoji', 'name id')): """Checks if this is a Unicode emoji.""" return self.id is None + def _as_reaction(self): + if self.id is None: + return self.name + return ':%s:%s' % (self.name, self.id) + class Emoji(Hashable): """Represents a custom emoji. -- cgit v1.2.3