Persist bot mode across restarts via database

Adds a BotSettings key-value table. The active mode is saved
when changed via /bcs-mode and restored on startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 09:26:00 -05:00
parent 622f0a325b
commit 6e1a73847d
3 changed files with 71 additions and 0 deletions

View File

@@ -559,6 +559,9 @@ class CommandsCog(commands.Cog):
self.bot.current_mode = mode
new_config = self.bot.get_mode_config()
# Persist mode to database
asyncio.create_task(self.bot.db.save_setting("current_mode", mode))
# Update bot status to reflect the mode
status_text = new_config.get("description", "Monitoring vibes...")
await self.bot.change_presence(