1. You create a class and export it using `module.exports` and make it extend the vylbot's `command` class.
2. In the `constructor()` you need to call `super(run)`, replacing `run` with a string of the name of the method which will run when the command runs.
3. Call any of the `super` variables to give it some description, the current ones you can use are: `description`, `category`, `usage`
4. If you want the command to only be allowed to run by people with a role, set the role name in `super.roles`
> **Note:** You can set more than one role to be required by setting `super.roles` again.
5. If you want the command to require a variable in the config, set the name in `super.requiredConfigs`
> **Note:** You can set more than one role to be required by setting `super.requiredConfigs` again.
6. Create a method using the name you set in `super(run)`, with the `context` as its parameter.
The `context` parameter will be a JSON object of:
```json
{
"command": "<CommandName>",
"arguments": "<CommandArguments>",
"client": "<BotClientObject",
"message": "Discord.js Message Object",
"config": "The command's config (if any)"
}
```
The command's config will be stored under the command's name, for example, if a command called `test` has set `super.requiredConfigs = "link"`, it will be set in the config as `test.link`.
1. You create a class and export it using `module.exports` and make it extend the vylbot's `event` class.
2. In the `constructor()` you need to call `super(run)`, replacing `run` with a string of the name of the method which will run when the event gets triggered.
3. Create a method using the name you set in `super(run)`, with the parameters being as per your event's paramaters in the discord.js documentation.
> **Note:** The name of the event file will determine what event it will be triggered on. For example, if you want to have an event trigger everytime a message is sent, put into your event folder a file called `message.js` and follow the steps above.