Not all emojis have the animated attr yet hotfix

This commit is contained in:
Jeremy Zhang 2018-03-01 08:37:39 +00:00
parent 5a2e51b135
commit 572a3f0341

View File

@ -21,7 +21,7 @@ def parse_emoji(textToParse, guild_id):
for gemoji in guild_emojis:
emoji_name = gemoji["name"]
emoji_id = gemoji["id"]
emoji_animated = gemoji["animated"]
emoji_animated = gemoji.get("animated", False)
if emoji_animated:
textToParse = textToParse.replace(":{}:".format(emoji_name), "<a:{}:{}>".format(emoji_name, emoji_id))
else: