0.0.3 • Published 3 years ago

ezslash v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago
  • Documentation (COMING SOON)

Installation

npm install ezslash --save

Example

Creator

const { Client } = require('discord.js')
const { Creator } = require('ezslash')
const path = require('path')

const client = new Client()
const creator = new Creator({
    client: client,
    token: 'TOKEN',
    publicKey: 'PUBLIC_KEY',
    applicationID: 'APPLICATION_ID'
})

creator.loadCommands(path.join(__dirname + '/commands/'))

client.login('TOKEN')

Command

const CommandType = require('ezslash')

module.exports = {
    data: {
        type: CommandType.GUILD_ONLY, // CommandType.GLOBAL for global commands
        description: 'Test',
        options: [],
        guildID: '' // Only if you want guild-restricted commands
    },
    execute: async (client, interaction) => {
        interaction.send(`Hello, ${interaction.user.username}`)
    }
}
0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago