D
D
Djs Command Control
Github
NPM
Search…
1.5.*
Discord.js Command Control
djs-command-control
Welcome!
Classes
Types
Examples
Initializing the Object
Adding Categories
Registering the event
Create commands
Extending
djs-command-mongo
Welcome!
Permissions Plugin
Powered By
GitBook
Registering the event
This page shows how to call the command handler to make commands actually work
We want to do other things in the Message event
1
// `client` is our Discord.js Client
2
// `commands` is our djs-commands-control Commands object
3
4
client
.
on
(
"message"
,
(
message
)
=>
{
5
// Do some stuff
6
7
// Call the command handler
8
commands
.
messageEvent
(
message
);
9
10
// Do some more other stuff
11
});
12
Copied!
We only want to call the command handler
1
// `client` is our Discord.js Client
2
// `commands` is our djs-commands-control Commands object
3
4
client
.
on
(
"message"
,
commands
.
messageEvent
);
5
Copied!
Previous
Adding Categories
Next
Create commands
Last modified
1yr ago
Copy link
Contents
We want to do other things in the Message event
We only want to call the command handler