1.0.5 • Published 3 years ago

discord.js-confirmation v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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!!!");
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago