Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

discord.js-confirmation

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord.js-confirmation

---

  • 1.0.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 30 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc