This is a package where you can easily make confirmations
Here's how to do it
constdiscord=require('discord.js');constclient=newdiscord.Client();constconfirmation=require('discord.js-confirmation');client.on('ready',()=>console.log(`I am ready to make confirmations!`));client.on('message',async(message)=>{if(message.author.bot)return;if(message.content.startsWith("!confirmation")){letmsg=awaitmessage.channel.send('here is your confirmation');// first parameter is Message object and is required// second parameter is the time when it endsletconfirmed=awaitconfirmation(msg,30000);if(confirmed===undefined)awaitmessage.channel.send(`The timer ran out!`);if(confirmed===true){awaitmessage.channel.send("I see you selected :white_check_mark: !");}else{awaitmessage.channel.send("I see you selected :x: !");}}})client.login("TOKEN GOES HERE!!!");