Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.72 KB

bot.onreactionremove.md

File metadata and controls

48 lines (37 loc) · 1.72 KB
description
An event that gets executed, if the bot sees a user removing a reaction on a message. To let the bot listen to the event, add one bot.onReactionRemove() callback inside your mainfile.

bot.onReactionRemove

This callback logs every time a user un-reacts to a message

Usage:

bot.reactionRemoveCommand({ //command
channel: "channel id", //channel where it logs
code: `your code` // Message that will be sent to <channel>
}) 

Example Command:

bot.reactionRemoveCommand({
channel: "772414449839636490", 
code: `
$username has unreacted with $emojiToString
`
}) 

Here's an example

Functions:

  • $emojiToString => the exactly emoji itself, either default emoji e.g. 🎉 or <:emojiname:emojiID> style.
  • $emojiName => the name of the emoji the user reacted with
  • $emojiID => the ID of the emoji the user react with (for custom Emojis)
  • $messageID => to get the messageID the user reacted
  • $authorMessage => to get the authorID of the messagte the user reacted to
  • $channelID => to get the channelID of the message
  • $authorID => the ID of the user that reacted
  • $username => the username of the user that reacted

{% hint style="info" %} You can use functions like $onlyForChannels or the following functions inside an $onlyIf[] limiter at the bottom of the code to limit your code to specific reactions etc: {% endhint %}