Reputation:
This code errors no matter how I change it, and I just want it to delete the message upon receiving "🗑" reaction.
client.on('messageReactionAdd', (reaction, user) => {
if (user.bot) return;
if (reaction.emoji.name === "🗑") {
message.delete(0500);
}
})
Upvotes: 0
Views: 3348
Reputation: 491
To delete a message upon reaction use the reaction.message.delete()
method. This accesses the message that the reaction refers to, and deletes it.
Upvotes: 3