Written by: Chujia Guo
This project is my attempt at making a discord bot template. It can be reused to make multiple bots without starting from scratch.
- Custom Command Ready
- Has some basic commands such as
ping
andhelp
- Commands have permissions.
- Before starting, make sure you have Node.js and Discord.js installed.
- In order to start using the bot, create a
privatekeys.json
file in the root folder. (This is where themain.js
file is) - In that file, add your token in JSON format, like so:
{
"token":"insert-token-here"
}
- Install dependencies by running
npm install dependencies
while in this folder. - Add your bot to the server of your choice, run
node main.js
in your terminal and you should be all set!
- Add custom commands in the
custom_commands
folder. - Basic Command Template:
exports.run = async (client, message, args, Discord) => {
//Insert Code Here!
}
exports.config = {
"name": "",
"description":"",
"aliases": [""]
}
- Manually add permissions in the
permissions.json
file using command name to role id pairs, or by using thesetup
command.