I'm trying to add a custom emoji as a reaction to a message using discord.py version 0.16.12 and I'm unable to get it functional. Here's the code I'm using:
@bot.event
async def on_message(message):
if message.content.find(':EmojiName:'):
await bot.add_reaction(message, '<:EmojiName:#EmojiID#>')
I've also tried passing the emoji id as a string similar to discord.js (message, '#EmojiID#')
. Am I supposed to pass the add_reaction
function an emoji object? And if that's the case, how do I find the specific emoji object from the get_all_emojis
function?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…