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

djs-reaction-collector

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

djs-reaction-collector

Easily Create Reaction Collectors on discord.js v12

  • 2.9.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Discord JS Reaction Collector

A simple package to use discord.js v12 reaction collectors.

  • Support Server
  • License
  • Node JS
  • Discord JS

Install

First install the package

npm i djs-reaction-collector

Importing

// Using discord.js
const collector = require('djs-reaction-collector');

// Using typescript
import collector from "djs-reaction-collector";

Examples

Pagination

//INITIALIZATION
const { pagination } = require('djs-reaction-collector')
const Discord = require('discord.js');
const lol = new Discord.MessageEmbed();

pages = [
    lol,
    lmao
];

//DEFAULT TIME IS 12 SECS
//const timeout = 30000; IN MILLISECONDS FOR CUSTOM TIME
pagination(message, pages, emojiList, timeout);

Confirm

//INITIALIZATION
const { confirm } = require("djs-reaction-collector")
//EXAMPLE OF SENDING MESSAGE
message.channel.send("Do you want to send the message?").then(async (message) => {
    const reactions = await confirm(message, message.author, ["✅", "❌"], 10000); //TIME IS IN MILLISECONDS
    if(reactions === "✅") {
        message.channel.send("Hello All")
    }
    if(reactions === "❌") {
        return;
    }
    else {
        console.log("Timed Out")
    }
})

Delete Timeout

//INITIALIZATION
const { deletetimeout } = require("djs-reaction-collector")
//EXAMPLE OF A MESSAGE

const deletion = await message.channel.send("DJS REACTION COLLECTOR");

//USING FUNCTION
deletetimeout(message, deletion, 5000) //TIME IN MILLISECONDS

Keywords

FAQs

Package last updated on 10 Mar 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