acceptmessage

1.1.0 • Public • Published

~ 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

Package Sidebar

Install

npm i acceptmessage

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

9.5 kB

Total Files

4

Last publish

Collaborators

  • zekro