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")

Constructor

The constructor automatically loads all js files in the path that exports the Command type

Name

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

Functions

Name

Type

Arguments

Returns

Description

messageEvent

AsyncFunction

message: Message

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

Last updated