Making your first command
All of the following guide will be on the index.js file we created in the previous guide
How do command works?
Here is a basic system that how command work:
Getting stuff ready
To start, we will be using the message event. Message event emits whenever a message is sent in a server. So go ahead and type in the code below:
index.js
We will be writing in line 2 of the code from now on.
Next, we will be getting message content that is sent in the server and validate it.
It is suggeted to put a prefix to the command. A prefix is what comes before a command, in the following example, L! is the prefix
index.js
Adding more commands
To add more commands, just simply copy paste the if statement. Here is an example:
Last updated