This package has been deprecated

Author message:

The Discord Plugin has moved to @leverage/plugin-discord!

leverage-plugin-discord

1.0.1 • Public • Published

Discord for Leverage!

This is a plugin for Leverage that allows the discord type of components to be created.

Config

{
    event: 'Any event name from Discord.js'
}

Example

import { manager, Component } from 'leverage-js'
import discord from 'leverage-plugin-discord'

class Bot extends Component {
    constructor () {
        super()

        this.config = {
            type: 'discord',
            discord: {
                event: 'message'
            }
        }
    }

    discord (message) {
        if (message.content.startsWith('ping')) {
            message.channel.send('pong')
        }
    }
}

manager.plugin(discord)

manager.add(new Bot())

discord.login('<YOUR_BOT_TOKEN>')

Readme

Keywords

Package Sidebar

Install

npm i leverage-plugin-discord

Weekly Downloads

1

Version

1.0.1

License

ISC

Last publish

Collaborators

  • jakehamilton