How do I get the bot to send a message and then do something if someone reacted to a specific message?
You can use
message.channel.send()
to send a message to the channel that triggered the event. This could be a user message or a function that runs repeatedly overtime.
Then, you can use this event that triggers when the botâs message gets reacted:
[BotClient].on(âmessageReactionAddâ, (reaction, user) => {}
ââreactionââ has ââreaction.emojiââ which is the reacted emoji, and ââreaction.messageââ returns the original message that has been reacted.
With that you can do something like
if (reaction.emoji === â
â)
if you want for the condition to be triggered with a specific emoji
Thank you so much! And welcome to the community by the way!
actually itâd be reaction.emoji.name
so
if (reaction.emoji.name === ââ) {âŚ}
Please donât bump old posts and OP already found the answer. Also, this could be for a older version of discord.js and the API could be different.