mirror of
https://github.com/jcreek/MupBot.git
synced 2026-07-12 18:33:44 +00:00
b11f4a03201ce58a911ae9a13788b1cd1fd60204
MupBot
An open source Discord bot for helping coders gain experience working on open source projects.
How to contribute (add your code to this project)
You should fork this project and submit Pull Requests with your changes, ready to be code reviewed and merged into this project.
Add a command
To add a command, edit the commands.js file.
You need to create a function containing the code you want to run, and add a case that matches your desired command.
For example, for the command 'example' you would need to add the case:
case 'example':
commandExample(Discord, config, logger, message, command, args);
break;
You would also need to add the function:
function commandExample (Discord, config, logger, message, command, args) {
// Your code goes here
}
Notice the naming convention for the function is 'command' followed by your desired command, in camelCase. For example, a command of thisisalongcommand would have a function called commandThisIsALongCommand.
Languages
JavaScript
97.4%
Dockerfile
2.6%