aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Groth <[email protected]>2018-08-30 20:45:09 +0200
committerRapptz <[email protected]>2018-08-30 18:33:51 -0400
commit3ccbda928eed47e06283139eb0d05fa898ece19e (patch)
treea0ef25077221090dcec96bd1303ffa693edd049f
parent[commands] Prepend mention prefixes in commands.when_mentioned_or (diff)
downloaddiscord.py-3ccbda928eed47e06283139eb0d05fa898ece19e.tar.xz
discord.py-3ccbda928eed47e06283139eb0d05fa898ece19e.zip
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.
-rw-r--r--discord/emoji.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/emoji.py b/discord/emoji.py
index b6977322..f4b1054b 100644
--- a/discord/emoji.py
+++ b/discord/emoji.py
@@ -86,7 +86,7 @@ class PartialEmoji(namedtuple('PartialEmoji', 'animated name id')):
def _as_reaction(self):
if self.id is None:
return self.name
- return ':%s:%s' % (self.name, self.id)
+ return '%s:%s' % (self.name, self.id)
@property
def url(self):