I'm trying to make a discord bot where it deletes channels with a command along with a confirmation. I have made an Embed but I don't know how I would make it where you can type a word like "Confirm" after you used the command and it activates the delete channel part. Also, I would like to make it where they only have 10 seconds to type "Confirm" to activate the command. I hope this all makes sense. I'm new to this and it's almost 4 am in the morning lol. Here is the piece of code I have so far:
switch (args[0]) {
case 'nuke':
if (message.member.roles.cache.has('865492279334928424')) {
const embed = new Discord.MessageEmbed()
.setTitle(':rotating_light: Nuke Enabled :rotating_light:')
.addField('You have 10 seconds to confirm the nuke.', 'Please type "Confirm" to launch the nuke.')
.setFooter("This nuke will destroy the channel along with its messages.")
.setColor(0xff0000)
message.channel.send(embed);
}
break;
}
});
So, after an admin does !nuke they have 10 seconds before they can't launch the nuke (delete the channel). So after the embed is sent I want them to have to type Confirm to then delete the channel they are typing in. How would I be able to do this? Once again I hope you understand this. It's my first time lol.