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

djs-confirmation

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

djs-confirmation

Confirmations with reactions or buttons in an easy way.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

djs-confirmations

Confirmations with reactions or buttons in an easy way.

Requirements

  • Discord.js V13.1.0 (Will be changed overtime)
  • Node.js v16.6.1+ (Discord.js Requirement)

Defining

Using Node.js require()

const confirmation = require("djs-confirmations");

Using ES6 imports

import confirmation from "djs-confirmations";

Button Confirmation

////// MAKE SURE YOU DEFINED THE PACKAGE
const Discord = require("discord.js");
const client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES] });

client.on("ready", () => console.log(`I am ready to make cool button confirmations.`));

client.on("message", message => {
  if (message.author.bot) return;
  if (message.content == "confirm") {
    const returned = new confirmation.ButtonConfirmation(
      message.channel /*channel to send the message*/,
      messageOptions /*message's options (MessageOptions)*/,
      message.author.id /*User to click the button*/,
    ).start();
    let interaction = returned[1];
    if (returned[0]) {
      interaction.reply("You selected true");
    } else {
      interaction.reply("You selected false");
    }
  }
});

client.login("super secret token");

Reaction Confirmation

Find em out with the typings or just check the internal codes at https://npm.runkit.com/djs-confirmations I'll do this later bye :D

FAQs

Package last updated on 13 Aug 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