Skip to content

Defaults

Ayfri edited this page Feb 12, 2021 · 2 revisions

Defaults Events

There is for now only one Default Event which is the message event. To use it, simply execute the setDefaultEvents function from the CommandHandler Namespace.

Defaults Commands

There is for now only one default Command which is the ping command. To use it, simply execute the setDefaultCommands function from the CommandHandler Namespace.

⚠️Both must be executed after the create function.⚠️

Example

const {CommandHandler} = require('advanced-command-handler');

CommandHandler
.create({
	eventsDir: 'events',
	commandsDir: 'commands',
	prefixes: ['!'],
})
.setDefaultEvents()
.setDefaultCommands()
.launch({
	token: 'token goes here',
});