Sfoglia il codice sorgente

Fix animated emoji

Alex Taber 6 anni fa
parent
commit
dc6ac7f694
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5
    1
      app.py

+ 5
- 1
app.py Vedi File

@@ -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):