I'm coding a suggestion bot that's supposed to send a player's suggestion to a suggestions channel in my server and react in the suggestions channel with some emojis.
The problem is that using 'message' as the Message parameter would react to the message sent to trigger the code, but I want it to react to the message the bot sent to the suggestions channel. I'm fairly new to coding. How can I get the bot to react to a message in a different channel?
text_channel = client.get_channel('527127778982625291')
msg = 'Your suggestion has been sent to '+str(text_channel.mention)+' to be voted on!'
await client.send_message(message.channel, msg)
msg = str(message.author.mention)+' suggested "'+str(repAdder)+'"'
await client.send_message(discord.Object(id='527127778982625291'), msg)
print(message)
await client.add_reaction(bot_message, ":yes:527184699098136577")
await client.add_reaction(bot_message, ":no:527184806929235999")
await client.add_reaction(bot_message, '🤷')
You needed to add the reaction to the message that the bot sent, not the user-sent message. Passing the bot-sent-message as a Message object to client.add_reaction() instead of the original message should fix the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With