New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

acceptmessage

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acceptmessage

An extension for discord.js to create accept messages with reactions

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

~ AcceptMessage ~

discord.js addon to create acceptable messages

 

👉 JSDOCS

Usage

const Discord = require('discord.js')

// Import AcceptMessage
const AcceptMessage = require('../src/main.js')

// Create discord.js bot instance
const client = new Discord.Client()

// When a new member joins the guild, the bot will send an accept message to them via PN
client.on('guildMemberAdd', (member) => {

    // Build the AcceptMessage
    var msg = new AcceptMessage(client, {
        content: new Discord.RichEmbed()
            .setDescription('Please accept the [rules](https://some.rules.or.so) of the guild by clicking the ✅ reaction below.')
            .setColor(0xf76707),
        emotes: {
            accept: '✅',
            deny:   '❌'
        },
        checkUser: member,
        actions: {
            accept: (reaction, user) => {
                // do some stuff after acception
            },
            deny: (reaction, user) => {
                // do some stuff after deny
            }
        }
    })

    // Send the message to the member. If you want to send it in a public channel, just
    // use any other text channel resolvable by discord.js here.
    msg.send(member)

})

// Logging in the client
client.login(process.argv[2])

© 2018 Ringo Hoffmann (zekro Development)
contact[at]zekro.de | zekro.de

Keywords

discord.js

FAQs

Package last updated on 11 Jul 2018

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