Fun discord bot
- Install .NET 8 or newer SDK
- Have a Discord bot ready to go
- Have a Postgres server ready to go
- Set the required configuration values
- Run the bot with
dotnet run
or your favourite IDE
Required configuration values are:
BChan:DiscordBotToken
(string)BChan:DiscordGuildId
(ulong)BChan:DbConnectionString
(Postgres connection string)
The recommended method for handling configuration in development is user-secrets
.
For example:
cd src/BChan.Worker
dotnet user-secrets set "BChan:DiscordBotToken" "MyBotToken"
Updating database models requires creating a migration.
After updating the models under src/BChan.Worker/Database
, create a new migration by running
dotnet ef migrations add "My migration name"
. The migration will be automatically applied at startup.