I want to do is that when the embed message is changed, the reactions are reset, not deleted. I mean that when someone reacts to the emoji and embed its changed, the reaction returns to 1 and does not stay at 2. and when it returns to 1 I can send a third embed
ty
This is the code I am using:
const embed = new MessageEmbed()
.setTitle("Test1")
.setFooter("Test1");
message.channel.send(embed).then(sentEmbed => {
sentEmbed.react("➡");
const filter = (reaction, user) => {
return (
["➡"].includes(reaction.emoji.name) &&
user.id === message.author.id
);
};
sentEmbed
.awaitReactions(filter, { max: 1, time: 30000, errors: ["time"] })
.then(collected => {
const reaction = collected.first();
if (reaction.emoji.name === "➡") {
const embed2 = new MessageEmbed()
.setTitle('test2')
.setDescription('test2')
sentEmbed.edit(embed2);
}
})
});