- Nodejs (https://nodejs.org/en/) preferably v10 or above
- MongoDB (https://www.mongodb.com)
- Discord API_KEY (You can get it from https://discordapp.com/developers/applications/)
In order to work on this project on your machine, you can follow the instructions below
- Fork this repository
- Open your terminal and
cdto your~/your_folderfolder - Clone your fork into the
~/your_folderfolder, by running the following command replace your username into {your_username} slot:git clone git@github.com:{your_username}/bot9 - CD into the new directory you just created:
cd bot9 - Run the
setup.shbin scriptIn case you encounter errors such as./bin/setup.sh
command not foundorpermission deniedyou may need to follow these steps to solve your problem:sudo chmod +x ./bin/setup.sh ./bin/setup.sh
You may pass your discord api key in .env file according to the setup. This key is important and should never be allowed to display publicly.
You may also wish to enter your MongoDB URL in .env file. In case you have no idea how to configure your mongoDB, you can try MongoDB Atlas for free (https://www.mongodb.com/cloud/atlas)
The URL might looks something like this mongodb://localhost/test. Where test is our database name running locally.
If you wish to visually manage your bot, don't worry. You can run
$ npm run webThis command will start and build the web dashboard interface. Go to localhost:3001 to see this in action! (You will be asked for your discord api key in order to gain access)
Execute one of these commands to run the bot:
This command automatically restart the bot when file changes in the directory are detected (Highly recommended). Just be aware of abusing the API, discord might ask you to change your API key if the bot keeps restarting multipe times in a short period.
$ npm run serveYou will need to run this command again if you makes changes to the bot (Not recommended)
$ npm startNote: prefix must go before command name. And arguments must be seperated from command name with a space
8ball <question>?
Think of a question that can be answered yes or no. And write it next the command.
For example:
8ball Am I a good person?
anime <anime_name>
This command allow you to search for the anime name and display the information
ban <@user>
This command allow you to ban a mentioned user
bunny
This command does not take any argument and return random bunny's pic.
catfact
This command does not take any argument and return random cat's fact.
daily
This command does not take any argument, it gives out a random amount of coins and saves to your account. You can only do this once for every 24 hours.
- tips: you can expand the use of coins.
danboruu
This command does not take any argument. It displays a random nsfw picture. Make sure you run this command in #nsfw channel.
- Exclude categories:
["loli", "shota", "cub", "young", "guro", "gore"]
fact
Return random facts
finduser {searchterm}
Find if user exists in the server
hbj
This command does not take any argument. It displays a random nsfw picture. Make sure you run this command in #nsfw channel.