Skip to content

Commands

LucasCtrl edited this page Oct 9, 2021 · 2 revisions

Commands

Commands list

Mode:

  • PROD: command that's work in DEV and PROD mode
  • DEV: command that's only work in DEV mode
Command Aliase(s) Desciption Mode
emitgc - Emulate guildCreate event DEV
emitgd - Emulate guildDelete event DEV
ping - Give bot and API latency PROD

Command file structure

The command file is an object exported as default.

Object structure

export default {
  command: 'command', // REQUIRED
  aliases: ['aliase1', 'aliase2'], // OPTINAL, no quantity limit
  permissions: 'ADMINISTRATOR', // OPTIONAL, based on this list: https://discord.js.org/#/docs/main/stable/class/Permissions?scrollTo=s-FLAGS
  help: { // OPTIONAL, if this block doesn't exist, the command is not displayed in the help panel
    name: 'Name', // REQUIRED if 'help' block exist
    description: 'Command description' // REQUIRED if 'help' block exist
  },

  run: async (client, message) => {
      // ...
      // Do your stuff here!
  }
}
Clone this wiki locally