Fix PartialEmoji._as_reaction() for emojis the bot can't see

If the bot has access to the emoji, you can pass anything for its name
and it will work fine. The name is only required to be correct when
adding a reaction where you do not have access to the emoji,
all other cases ignore the name.
This commit is contained in:
Carl Groth 2018-08-30 20:45:09 +02:00 committed by Rapptz
parent b9ef80b0d0
commit 3ccbda928e

View File

@ -86,7 +86,7 @@ class PartialEmoji(namedtuple('PartialEmoji', 'animated name id')):
def _as_reaction(self): def _as_reaction(self):
if self.id is None: if self.id is None:
return self.name return self.name
return ':%s:%s' % (self.name, self.id) return '%s:%s' % (self.name, self.id)
@property @property
def url(self): def url(self):