A personal use discord bot written by myself. Built on top of the sapphire framework and written in TypeScript.
TODO
npm installYou have two options for development with this bot. You may choose to use the Docker setup (recommended) or develop directly via your IDE/editor of choice. Please note that support for developing outside of Docker may be limited. Instructions for each are as follows:
- Create a discord application and be sure to note down your application token.
- In the
src/directory, copy the existing.env.developmentand rename it to.env.development.localfile (IMPORTANT: The existing.gitignorerules should prevent this file from being committed but make sure not to commit any sensitive information!) - Fill out the empty fields with the appropriate information, namely the Discord IDs of the bot owners and your discord application token.
- Run
docker compose --env-file src/.env.development.local upin the terminal where the bot is located. (If you want to get access to your DB information in a browser, you can rundocker compose --env-file src/.env.development.local --profile dev up) - After a bit of time, all the relevant containers should be setup and running!
- If running the dev profile, you can access your Prisma Studio instance via
http://localhost:5555- the login information is in.env.development.local
Note: These steps assume you have an installed and running PostgreSQL server
- Create a discord application and be sure to note down your application token.
- In the
src/directory, copy the existing.env.developmentand rename it to.env.development.localfile (IMPORTANT: The existing.gitignorerules should prevent this file from being committed but make sure not to commit any sensitive information!) - Fill out the empty fields with the appropriate information, namely the Discord IDs of the bot owners and your discord application token. (IMPORTANT: Make sure to change the
postgressection of the database url inDATABASE_URLtolocalhost) - Run
npm install - From the bot parent directory, run
npm run prisma dev migrate dev - You can run the bot now in two ways:
- If you wish to watch the repository files and automatically restart the bot when any are changed, run
npm run watch:start - If you wish to just run the bot, run
npm run dev
- If you wish to watch the repository files and automatically restart the bot when any are changed, run
I have included VS Code files for ease-of-use as well.
TODO
This project uses the MIT License.