-
-
Notifications
You must be signed in to change notification settings - Fork 8
How to use it
Ayfri edited this page Jul 15, 2021
·
5 revisions
To install the command handler, install Node.js
(in the latest LTS version) and then in a terminal run this command where you want your bot npm install --save advanced-command-handler
.
After, you create your main file and adds this into it :
You can see a basic usage, plus the list of optional properties:
const {CommandHandler} = require('advanced-command-handler');
CommandHandler.create({
// Optionals :
commandsDir: 'name of the dir',
eventsDir: 'name of the dir',
prefixes: ['!', 'coolPrefix '], // Mentionning the bot is also a valid default prefix
owners: ['Discord IDs'],
});
CommandHandler.launch({
token: 'YOUR TOKEN GOES HERE',
// Optional :
clientOptions: {
// Client Options, see Discord.js#ClientOptions
},
});
You can see some advanced examples in this repo.
Updated to version 2.4.0
.
The official Discord support server is there.