This bot is written in Typescript using Discord.js - https://github.com/discordjs/discord.js/
It uses SQLite3 to store persistent code.
git clonethis repository.- Install Docker Engine.
- Install Docker Compose.
- Add
BOT_TOKEN="your discord bot token"to a file called.envin the root of this project. - You're ready!
There are 2 ways to run the bot:
Run npm run dev to run a Docker container that uses ts-node-dev for hot-reloading during development.
Run npm start to spin up a Docker container that transpiles the server code and runs the server.
- Run
npm testto spin up a Docker container that transpiles the server code and runs the tests. - Run
npm run lintto check for code style violations.
Before porting to SQLite3, storage was deserialised and saved into a json file. Here are the steps to convert the json into a SQLite3 Database.
node database/migrate.js- If there is no errors in the console, we're done. Double check with a DB Browser Application to confirm that the data has been ported over properly.
Dev Guide (Under construction indefinitely :))
Feel free to fork and submit pull requests.
Run npm test and eslint ./src/** and make sure all tests and code style checks are passed!