Do you want to add the reaction to a specific message using Discord.py? This article will show you how to add a reaction to a specific message using Discord.py in Python.
So, you have been trying to make a bot using discord.py to add a reaction to a message once it has been read. But you keep getting errors one such error is CommandInvokeError.
This error usually occurs because you are trying to treat the string as a message object of discord. Let me show in the below example code how you can fix it and add a reaction to your message in discord.
How to Add Reaction to a Message using Discord.py in Python
You can use the below-mentioned method to get the reaction automatically with help of a discord bot on the message you want.
await bot.add_reaction(msg, emoji) @commands.command(pass_context=True) async def emoji(ctx): msg = await bot.say("Adding Reaction...") reactionList = ['pilot'] for emoji in reactionList: await bot.add_reaction(msg, emoji)
Using the above code you can successfully add a reaction to the discord message with help of a bot. And you can use the same code to automate your reactions to discord with help of a bot in Python.
I hope you were able to get to know how to add the reaction to a message using discord.py and how you can code it yourself for the different types of reactions you want.
Let me know if you have a better method than the one discussed above I will be happy to add it here.