A Discord.js Bot I originally put into Commando, however I made this version so its easier for users to use
- using the lib Discord.JS
- Version 2 of BB-8
Installation + Hosting Yourself
🚦 This bot requires Node.js 6.1.0 or higher.
- Download this file from here for the latest version or download git and clone this repository
- Go get a
.sqlite
file, however rename it to saybot.sqlite
once you have it we are going to be using sqlite database - Create a file called
settings.json
and put in the file this. Then fill out the info
{
"prefix": "YOUR_BOT_PREFIX",
"token" : "YOUR_BOT_TOKEN",
"ownerID": "YOUR_DISCORD_ID"
}
- Go into the message file in the events folder, and when you find this line, edit to to have your bot's prefix aswell
var prefix = "YOUR_BOT_PREFIX"
- Go into
app.js
file and edit out the line on no.18 with your Discord I.D - Open up a command prompt (or your preferred terminal) in the bot folder.
- Run
node app.js
- Its going to say stuff like
could not find moment dependency or something close to it
,
so you then just runnpm install
plus the missing dependency
Examplenpm install discord.js
- Once you have downloaded everything, the next time you run
node app.js
, it should say
`I'm Online`
And you should be all set from there!
FAQ
-
This Bot was developed in v11.0.0
-
To add commands, just go into the
commands
folder and put your cmd into it like the ping cmd Just make sure to put it within this handler
exports.run = function(client, message, args) {
}
anything else your cmd requires just put it in the file
-
To host while running pm2 Just run
pm2 start app.js
in the bot file -
If you have a command that requires args, you don't need to define it since it already is check the message handler in the events folder to see
-
If you update/add a cmd, you dont need to restart the bot. Just reload the command
Option | Usage |
---|---|
ping | sends user's ms |
owner | shows the owner of the guild |
members | shows the amnt. of members in the guild |
region | sends the region of the guild |
coin | flips a coin (heads or tails) |
quote | quotes a message via ID |
if any errors occur while trying to run the bot, comment them here or join this server and message me and I will see to it shortly