- Clone the repo
- Edit the .env adding your BOT's token
- Do npm install inside the src folder
- Set up the config.json in the following format
- Start the BOT using the commmand node index.js in the same directory as index.js
├── package-lock.json
├── package.json
├── src
│ ├── config.json
│ ├── index.js
│ ├── client
│ │ ├── commands
│ │ │ ├── dev.js
│ │ │ ├── mod.js
│ │ │ ├── utils.js
│ │ │ └── verification.js
│ │ ├── events
│ │ │ └── events.js
│ │ ├── helpers
│ │ │ ├── clientHelper.js
│ │ │ ├── misc.js
│ │ │ └── models.js
│ │ ├── interactions
│ │ │ ├── button.js
│ │ │ ├── cmenu.js
│ │ │ └── slash.js
│ ├── node_modules
│ │ └── All modules are included in source code.
Creating a new command is simple, add a new export in the /client-commands/appropriateFile.js
calling it whatever you want the command to be called, for example ping
Add the following code to the file. In every command you will always need to use this format.
(message.channel.send() is not reqired, just an example).
ping: function(message) {
clientInfo.message = message;
message.channel.send({
content: `Pong!!!\nPing =${clientInfo.client.ws.ping} ms`
});
},
Make sure to add the following line to every command
clientInfo.message = message;
Also make sure to add the command in config.json
and this.commands
of that particular file
The client attribute is a exportable from clientHelper.js
file.
The meaning of each file are as follows:
- utils.js for commands anyone can use
- verification.js for anything verification related
- mod.js & dev.js self explanatory
- misc.js for helper functions
- events.js for client event listeners
- models.js for defining schema for mongoose
- button.js for handling all button interactions
- cmenu.js for handling all message context menu interactions
- slash.js for handling all slash command interactions
Further documentation can be found here
If you would like to contribute to the project please open a PR (Pull Request) clearly showing your changes.
If you wish to contribute to the bot, run these steps:
-
Fork this repository or create branch in your username
-
Do whatever changes you wish to do and create a pull request with the following information furnished in the request message: The file you wish to change | What did you change
-
Wait for approval for reviewers. Your PR may be directly accepted or requested for further changes.
-
If you are accepted, you will be added to the contributors list.
Note: Send PR to dev branch only
If you have any issues feel free to open an issue or text in the discord server.
Credits for the format - here