This is the source code for the bot used on @LifeOfChrome's Discord giveaway server. Features include point tracking and modification features, and an automated puzzle answer system (WIP).
Although this bot is meant for a specific server, you can also set it up for use on your own servers. To set this bot up:
Download Git. You will also need MySQL installed on your server or computer. Then, clone the repository:
git clone https://github.com/mount2010/chromepointbot
This will download the repository to your computer.
Open your favourite text editor, and create a file called secrets.json. This is the structure of the file:
{
"db": {
"username": "",
"password": ""
},
"token": ""
}
Simply fill it in with your details. You can get a token at Discord's Developer portal. Click Add Application.
npm install
This will automatically download and install the dependencies (Discord.js, MySQL) to your computer.
Log into MySQL and create a database (fill secrets.json with the DB name) and a table "user":
CREATE TABLE user (userid VARCHAR(255), points INT, history TEXT, credits INT);
You can configure the bot in config.json and the JS files. Please do tell me (Mount2010#9649) if you use my bot! This is optional, but I'd like to know!
npm start