I have a reaction system so if someone reacts to a message something happens and if someone reacts to another message something else happens, but when the bot adds the last reaction, it deletes it. Please can someone help me? My code:
const createTicketEmbed = new Discord.RichEmbed()
.setTitle("Welcome!")
.setColor("#7289da")
.setDescription("To create a ticket, click the reaction that corresponds to what you require.\n\n**__Services__**\n\n:one: Logo Request\n:two: Server Review\n:three: Server Creation Help\n:four: discord.js Support\n:five: Application Creation Help\n\n**__Feedback__**\n\n:six: Question\n:seven: Suggestion\n:eight: Complaint")
message.channel.send(createTicketEmbed).then(async msg => {
await msg.react("1⃣"); await msg.react("2⃣"); await msg.react("3⃣"); await msg.react("4⃣"); await msg.react("5⃣"); await msg.react("6⃣"); await msg.react("7⃣"); await msg.react("8⃣");
const oneFilter = (reaction, user) => reaction.emoji.name === "1⃣";
const twoFilter = (reaction, user) => reaction.emoji.name === "2⃣";
const threeFilter = (reaction, user) => reaction.emoji.name === "3⃣";
const fourFilter = (reaction, user) => reaction.emoji.name === "4⃣";
const fiveFilter = (reaction, user) => reaction.emoji.name === "5⃣";
const sixFilter = (reaction, user) => reaction.emoji.name === "6⃣";
const sevenFilter = (reaction, user) => reaction.emoji.name === "7⃣";
const eightFilter = (reaction, user) => reaction.emoji.name === "8⃣";
const one = msg.createReactionCollector(oneFilter, {timer: 315360000000});
const two = msg.createReactionCollector(twoFilter, {timer: 315360000000});
const three = msg.createReactionCollector(twoFilter, {timer: 315360000000});
const four = msg.createReactionCollector(twoFilter, {timer: 315360000000});
const five = msg.createReactionCollector(twoFilter, {timer: 315360000000});
const six = msg.createReactionCollector(twoFilter, {timer: 315360000000});
const seven = msg.createReactionCollector(twoFilter, {timer: 315360000000});
const eight = msg.createReactionCollector(twoFilter, {timer: 315360000000});
one.on("collect", r => {
r.remove(r.users.filter(u => u === message.author).first());
return message.channel.send("someone reacted")
})
two.on("collect", r => {
r.remove(r.users.filter(u => u === message.author).first());
return message.channel.send("someone reacted")
})
three.on("collect", r => {
r.remove(r.users.filter(u => u === message.author).first());
return message.channel.send("someone reacted")
})
four.on("collect", r => {
r.remove(r.users.filter(u => u === message.author).first());
return message.channel.send("someone reacted")
})
five.on("collect", r => {
r.remove(r.users.filter(u => u === message.author).first());
return message.channel.send("someone reacted")
})
six.on("collect", r => {
r.remove(r.users.filter(u => u === message.author).first());
return message.channel.send("someone reacted")
})
seven.on("collect", r => {
r.remove(r.users.filter(u => u === message.author).first());
return message.channel.send("someone reacted")
})
eight.on("collect", r => {
r.remove(r.users.filter(u => u === message.author).first());
return message.channel.send("someone reacted")
})
})