Command Handler

Setting Command Handler Up

bot.commands.load({
    path: "./commands/"
})

commands can be renamed to any directory folder.

$updateCommands will update all commands in the ./commands/ directory.

Folder Setup

#1: Create a folder named commands.

#2: Make a subfolder.

#3: Finally, create your command file.

Example File

module.exports = {
  type: "commandType",
  name: "commandName",
  code: `code`
}

Multiple Commands In One File:

module.exports = [{
  type: "commandType",
  name: "commandName",
  code: `code`
}, {
  type: "commandType",
  name: "commandName",
  code: `code`
}]

Last updated