Verified Commit 41a0f4d7 authored by lexi's avatar lexi
Browse files

add warn in get_constant_emoji for bad input

parent 03dd9a81
......@@ -271,6 +271,10 @@ def get_constant_emoji(emoji: str, ctx: commands.Context = None, channel: discor
if isinstance(channel, discord.DMChannel):
return emojis[0]
if ctx is None and channel is None:
logging.getLogger('bot').warning('get_constant_emoji(%s) was called with no parameters supplied', repr(emoji))
return emojis[1]
return emojis[not channel.guild.me.permissions_in(channel).use_external_emojis]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment