Bordle includes slash commands for Server Admins (requires the "Manage Webhooks" permission) to manage daily puzzle streak notifications:
/subscribe [webhook_url]: Opts the server into receiving streak notifications. Optionally provide a specific Discord Webhook URL that the server will use to send notifications./unsubscribe: Stops all puzzle notifications for the server.
Create a .env file at root based on .env.example
Since database migrations are ran automatically in the entry point, Program.cs, ensure the Postgres DB is started with:
docker compose -f docker-compose.dev.yaml up -dIf you want to apply migrations beforehand, run
cd apps/server/,dotnet tool run dotnet-ef migrations add <YourMigrationName>anddotnet tool run dotnet-ef database update.
If you want to run the server without NSwag, use:
dotnet run --project=./apps/server/ -p:RunNSwag=FalseIf you want to run the server and register the Discord slash commands:
# we use -v d for detailed logging just incase errors occur
dotnet run --project=./apps/server/ --register-commands -p:RunNSwag=False -v d`Alternatively, use Docker to start up the test environment, run the server container with the flag, and remove it so we don't need to manually start up the dev Postgres DB container:
docker compose -f docker-compose.test.yaml run --rm server --register-commands --force-buildFor the server, run cd apps/server && dotnet test
Tailscale is one of the tools that can let us publicly expose the client URL with HTTPS, which Discord requires.
To set up and expose the test environment publicly using Tailscale:
- Start the test containers
docker compose -f docker-compose.test.yaml up -d --build
- Expose the client
(Note: The client application binds to port 8081 in the test environment.)
tailscale funnel --bg 8081
- Under Activites -> URL Mappings -> Root Mapping, map
/to your designated Tailscale domain on Discord (see for more info: https://docs.discord.com/developers/activities/building-an-activity#set-up-your-activity-url-mapping) - Under Activites -> Settings, enable activities on Discord (see for more info: https://docs.discord.com/developers/activities/building-an-activity#enable-activities)
- Under Overview -> OAuth2 -> Redirects, add your Tailscale domain
- Start the activity on Discord