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.npm ito install dependencies.- Add
BOT_TOKEN="your discord bot token"to a file called.envin the root of this project. - You're ready!
npm run-script buildto transpile the code intojavascript. Output files can be found in./buildnpm startto usets-nodeandnodemonfor testing.npm testto run tests.npx eslint ./src/**to 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!