aboutsummaryrefslogtreecommitdiff
path: root/discord/ext/commands
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-06-12 03:05:28 -0400
committerRapptz <[email protected]>2021-06-12 03:05:28 -0400
commit0bc5f276a716f2b8931742317dfabfac1162ffc8 (patch)
tree9b915846cccca6b22ee50548620200726186ca82 /discord/ext/commands
parentLazily create Button custom_ids in decorator interface (diff)
downloaddiscord.py-0bc5f276a716f2b8931742317dfabfac1162ffc8.tar.xz
discord.py-0bc5f276a716f2b8931742317dfabfac1162ffc8.zip
[commands] Change EmojiConverter to use Client.get_emoji
Diffstat (limited to 'discord/ext/commands')
-rw-r--r--discord/ext/commands/converter.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py
index d1b9a901..60be8c40 100644
--- a/discord/ext/commands/converter.py
+++ b/discord/ext/commands/converter.py
@@ -726,11 +726,7 @@ class EmojiConverter(IDConverter[discord.Emoji]):
emoji_id = int(match.group(1))
# Try to look up emoji by id.
- if guild:
- result = discord.utils.get(guild.emojis, id=emoji_id)
-
- if result is None:
- result = discord.utils.get(bot.emojis, id=emoji_id)
+ result = bot.get_emoji(emoji_id)
if result is None:
raise EmojiNotFound(argument)