CommandHandler
The CommandHandler namespace is the principle namespace you have to use throughout your project to access every features of the module.
Creating your CommandHandler
In order to initialize your CommandHandler, you have to use the create
function with the needed options.
Launching the CommandHandler
To launch the CommandHandler, use the launch
method and put the token of your bot, you can also put here clientOptions
, you can see here an example of this :
Presence
You have two options for setting the presence of your bot.
Loading Commands & Events
The CommandHandler will automatically load and handle your commands & events, if they are all in the correct path you put.
But you can still use the .loadXs(directory)
and .loadX(directory, name)
functions of the CommandHandler namespace at any time (but it's recommended to use them before launching the CommandHandler.
The CommandHandler class is extending the EventEmitter
class, which means that there are events that can be hooked. Click on the title of the section to see the list of events.
Last updated
Was this helpful?