discord.js-confirmation
v1.0.5
Published
---
Downloads
1
Readme
discord.js-confirmation
This is a package where you can easily make confirmations
Here's how to do it
const discord = require('discord.js');
const client = new discord.Client();
const confirmation = 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")) {
let msg = await message.channel.send('here is your confirmation');
// first parameter is Message object and is required
// second parameter is the time when it ends
let confirmed = await confirmation(msg, 30000);
if(confirmed === undefined) await message.channel.send(`The timer ran out!`);
if(confirmed === true) {
await message.channel.send("I see you selected :white_check_mark: !");
} else {
await message.channel.send("I see you selected :x: !");
}
}
})
client.login("TOKEN GOES HERE!!!");