This pull request addresses issues with Discord bot integration by updating the database schema and cleaning up backend warnings. The most important changes include adding missing Discord-related columns to the ApplicationSettings table to prevent SQLite migration errors, and silencing compiler warnings in DiscordBotService by making certain async methods return completed tasks.
Database migration improvements:
- Added migration
20251108121500_AddDiscordSettingsToApplicationSettings.csto add Discord-related columns (DiscordApplicationId,DiscordBotAvatar,DiscordBotEnabled,DiscordBotToken,DiscordBotUsername,DiscordChannelId,DiscordCommandGroupName,DiscordCommandSubcommandName,DiscordGuildId) to theApplicationSettingstable, ensuring compatibility with older databases and preventing runtime SQLite errors.
Backend warning cleanup:
- Updated
DiscordBotService.csto silence CS1998 compiler warnings by makingStopBotAsyncandIsBotRunningAsyncreturnTask.FromResult(...)instead of being markedasyncwithout any awaits. This ensures proper async method signatures without unnecessary warnings. [1] [2]
Documentation:
- Added a changelog entry for version 0.2.22 documenting the database migration and backend warning cleanup.Introduces new migration to add Discord-related configuration fields to the ApplicationSettings table. Refactors DiscordBotService methods StopBotAsync and IsBotRunningAsync to return Task<bool> synchronously instead of using async/await.
Automated canary build