DB-Script
Discord Server
NPM
Search…
DB-Script
Getting Started
NPM Updates
Known Bugs
Functionalities
Bot Functions
Events
BanCommand
BotJoinCommand
BotLeaveCommand
ChannelCreateCommand
ChannelDeleteCommand
ChannelUpdateCommand
EmojiCreateCommand
EmojiDeleteCommand
GuildUpdateCommand
JoinedCommand
LeaveCommand
LoopCommand
MessageDeleteCommand
MessageEditEvent
RateLimitCommand
ReadyCommand
ReactionAddCommand
ReactionRemoveCommand
RoleCreateCommand
RoleDeleteCommand
UnbanCommand
UserUpdateCommand
Functions
Guides
Other
Contributors
Discord Server
FAQs
Staff
Powered By
GitBook
ReactionAddCommand
An event that fires when a user reacts to a message. Placeholders can be used to return data about the reaction.
​
Placeholders: 13
1.
{reactions}
- How many reactions the message has after the event fires.
2.
{emoji}
- The emoji that was used to react to the message.
3.
{emojiid}
- The emoji ID that was used to react to the message.
4.
{emojiname}
- The name of the emoji that was used to react to the message.
5.
{didbotreact}
- Returns
true
if the bot reacted to the message, otherwise function returns
false
.
6.
{messageurl}
- The URL of the message that was reacted to.
7.
{reactedat}
- The date and time the message was reacted to.
8.
{identifier}
- The emoji identifier of the emoji that was used to react to the message. Great for piecing together the emoji that was used.
9.
{channelid}
- ID of hthe channel the reaction took place.
10.
{channelname}
- Name of the channel the reaction took place.
11.
{channelmention}
- Mention the channel the reaction took place.
12.
{guildid}
- ID of the guild the reaction took place.
13.
{guildname}
- Name of the guild the reaction took place.
​
Example 1: The event placed in the main file.
bot.ReactionAddCommand({
name: "39588639875304545",
code: `
$description[
$user[$authorID;mention] reacted to a {hyper:message:{messageurl}} with {emoji}
]
`
})
bot.onReactionAdd()
​
Example 2: The event placed in the
event handler
(its own file)
bot.onReactionAdd()
- Goes in the main file to be able to call the event!
module.exports.ReactionAddCommand = ({
name: "39588639875304545",
code: `
$description[
$user[$authorID;mention] reacted to a {hyper:message:{messageurl}} with {emoji}
]
`
})
Previous
ReadyCommand
Next
ReactionRemoveCommand
Last modified
1yr ago
Copy link
Outline
Placeholders: 13