mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
[commands] Change EmojiConverter to use Client.get_emoji
This commit is contained in:
parent
1c640ad72b
commit
0bc5f276a7
@ -726,11 +726,7 @@ class EmojiConverter(IDConverter[discord.Emoji]):
|
|||||||
emoji_id = int(match.group(1))
|
emoji_id = int(match.group(1))
|
||||||
|
|
||||||
# Try to look up emoji by id.
|
# Try to look up emoji by id.
|
||||||
if guild:
|
result = bot.get_emoji(emoji_id)
|
||||||
result = discord.utils.get(guild.emojis, id=emoji_id)
|
|
||||||
|
|
||||||
if result is None:
|
|
||||||
result = discord.utils.get(bot.emojis, id=emoji_id)
|
|
||||||
|
|
||||||
if result is None:
|
if result is None:
|
||||||
raise EmojiNotFound(argument)
|
raise EmojiNotFound(argument)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user