Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make my discord.py bot use custom emoji?

How can I make my bot use my custom emoji in any discord server?

@bot.command(pass_context=True)
async def ping(ctx):
    msg = "Pong :CustomEmoji: {0.author.mention}".format(ctx.message)
    await bot.say(msg)

Example: If I upload some custom emojis on Server 1 and when we use the !ping command (mentioned above) in Server 2 or Server 3 or any server where the bot has access to, it should use the custom emoji.

Result: Pong with :CustomEmoji:

like image 275
Demotry Avatar asked Aug 23 '18 09:08

Demotry


1 Answers

Also for animated ones you do <a:emoji_name:emoji_id>

like image 117
user14391471 Avatar answered Oct 17 '22 08:10

user14391471