onReactionAdd

Triggers when a user reacts to a message.

Add The Event: bot.addEvent("onReactionAdd")

Type: reactionAddCommand

Base Code

bot.command({
    type: "reactionAddCommand", // onReactionAdd type.
    channel: "channelID", // The channel which the message gets sent in.
    code: `code` // The code to run when someone adds a reaction.
})

Example

bot.command({
    type: "reactionAddCommand",
    channel: "39459438494840494",
    code: `<@$reactionAuthorID> just reacted with $reactionEmoji!`
})

onReactionAdd triggers for all servers (globally). You can prevent this by using server variables. (learn-more)

Last updated

Was this helpful?