瀏覽代碼

Fix animated emoji

Alex Taber 6 年之前
父節點
當前提交
dc6ac7f694
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      app.py

+ 5
- 1
app.py 查看文件

@@ -52,7 +52,11 @@ async def on_ready():
52 52
 	global channel
53 53
 	channel = discord_client.get_channel(discord_channel)
54 54
 	guild = channel.guild
55
-	emojis = {":{}:".format(emoji.name): "<:{}:{}>".format(emoji.name, emoji.id) for emoji in guild.emojis}
55
+	for emoji in guild.emojis:
56
+		if not emoji.animated:
57
+			emojis[":{}:".format(emoji.name)] = "<:{}:{}>".format(emoji.name, emoji.id)
58
+		else:
59
+			emojis[":{}:".format(emoji.name)] = "<a:{}:{}>".format(emoji.name, emoji.id)
56 60
 
57 61
 @discord_client.event
58 62
 async def on_message(message):