Bot was made for Iron Valor Discord Server as a commission. If you want your own custom Discord Bot, contact me via
Submit an Issue and tell me what's wrong.
This codebase is uses discord.js, sqlite3, .env, and a few other packages. If you experience a problem with a package, don't blame me.
- Do
npm installto install all dependencies from package.json. - Navigate to the model folder (
cd model/) and donode model.jsfile to create a database. - Fill out
.env. - Run Bot.
- Local Machine: Use
Run and Debugmenu. Do NOT just donode bot.js, it wont break, you'll just look dumb. - Server Machine: Install pm2 (
npm install pm2 -g) and dopm2 start bot.js --name "name of bot". This will auto restart the bot if a critical error occurs and allows you to remotely monitor your bot on the PM2 website.
- Local Machine: Use
Optional if running on a Server:
- View Database remotely:
-
Install python. If you're on a server, good luck. If you're on a local machine, install python.
-
Open a command line.
-
Do
pip install sqlite-web. -
Navigate to your db directory and do
sqlite_web your-database-file.db(You can also dosqlite_web --port 8080 your-database-file.dbto choose what port it appears on. Default is 8080). -
The line
sqlite_web running at http://0.0.0.0:8080/should appear. -
Open another command line.
-
ssh into that port -
ssh -L 8000:localhost:8080 user@your-server-ip. -
Open a browser or new tab.
-
Go to
http://localhost:8000to view your database remotely. -
From there, you can modify the data within your database.
-