So basically, I want the bot to delete its message after a user reacts to the message with a specific emoji. When I tried this with the code below, nothing happens. No errors oncesoever. I also don't want a time limit, just do a thing when it gets one reaction. Current code:
return ['????'].includes(reaction.emoji.name) && user.id === message.author.id;
};
message.awaitReactions(filter, { max: 1})
.then(collected => {
const reaction = collected.first();
if (reaction.emoji.name === '????') {
sentMessage.delete(1000)
} else {
message.reply('you reacted with a thumbs down.');
}
})
.catch(collected => {
console.log(`After a minute, only ${collected.size} out of 4 reacted.`);
message.reply('you reacted with neither a thumbs up, nor a thumbs down.');```