1.1.0 ā€¢ Published 6 years ago

acceptmessage v1.1.0

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

šŸ‘‰ 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)
contactatzekro.de | zekro.de

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago