This project is made using C#, DSharpPlus, PostgreSQL and Docker.
To deploy, you will need to have git, .NET, and Docker Compose installed. This should work on any OS, but feel free to let me know if something doesn't work as expected.
- Clone the repository and cd into it:
git clone https://github.com/Ascyt/open-qotd cd open-qotd - Create a
.env-file (in the repo root) and replace the parts in the square brackets with your information:POSTGRES_PASSWORD=[choose a secure password for postgres] POSTGRES_PORT=[use 5432 if you're not running multiple instances at once] OPENQOTD_TOKEN=[your Discord bot's token] PGDATA_PATH=[wherever you want your data to be stored]
- Start the database:
docker compose up db -d - In
Bot/appsettings.json(orBot/appsettings.defaults.jsonif it doesn't exist), set theEnableDbMigrationModeflag totrue: - Install the .NET migration tool:
dotnet tool install --global dotnet-ef - Run the following to make migrations (and initialize the database tables):
cd Bot dotnet ef migrations add InitialCreate dotnet ef database update cd .. - In
Bot/appsettings.json, set theEnableDbMigrationModeback tofalse:// ... "EnableDbMigrationMode": false, // ...
- Stop the database container:
docker compose down - From now on you can start the entire project with the following:
docker compose up --build -d
For testing, it should work to just stop the bot-Container (in Docker Desktop or using CLI) and run the project in VS or something similar.
This project is open to contributions! Please note that the code might be a little rough around the edges and is missing documentation, so feel free to ask me personally for help. Feel free to check out the Issues tab for things that need to be implemented!
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.