Commands
This is the full specification of the Commands Class
This class is exported as Commands, therefore import with
const { Commands } = require("djs-command-control")
The constructor automatically loads all js files in the
path
that exports the CommandObj type or an Instance of the Command ClassName | Type | Description |
client | Your Discord.js Client | |
path | string | The path of the commands folder relative to the root of the project (where package.json lives) |
options | The options for creating the Commands object |
Name | Type | Arguments | Returns | Description |
messageEvent | AsyncFunction | Promise<> | Should always be called in the onMessage event, this does not get registered autmatically, to allow you to do other things in the onMessage event | |
addCategory | Function | name : string; title : string | Adds another category that you can add commands t | |
addPlugin | Function | Adds a plugin to the commands object. |
Last modified 2yr ago