const filter = (reaction, user) => {
return (
["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣"].includes(reaction.emoji.name) &&
user.id === msg.author.id
);
};
message
.awaitReactions({ filter, max: 1, time: 30000, errors: ["time"] })
.then(async function (collected) {
const reaction = collected.first();
console.log(reaction.emoji.name);
if (reaction.emoji.name === "1️⃣") {
message.delete();
msg.reply("Done");
}
})
.catch((collected) => {
message.delete();
msg.reply("No response given.");
});
My Code Above is not working and never firing, I do not know why I looked up on google and they all give out this code. Any Help is Appreciated thanks.
The problem was I forgot to use the GUILD_MESSAGE_REACTIONS intent. My Bad.