fix(config): persist runtime settings across bot restarts
Add restore_runtime_settings() to ConfigManager that reads config_runtime.yaml on startup and restores persisted values into globals: - LANGUAGE_MODE, AUTONOMOUS_DEBUG, VOICE_DEBUG_MODE - USE_CHESHIRE_CAT, PREFER_AMD_GPU, DM_MOOD Add missing persistence calls to API endpoints: - POST /language/set now persists to config_runtime.yaml - POST /voice/debug-mode now persists to config_runtime.yaml - POST /memory/toggle now persists to config_runtime.yaml Call restore_runtime_settings() in on_ready() after evil/bipolar restore. Resolves #22
This commit is contained in:
@@ -105,6 +105,10 @@ async def on_ready():
|
||||
from utils.bipolar_mode import restore_bipolar_mode_on_startup
|
||||
restore_bipolar_mode_on_startup()
|
||||
|
||||
# Restore runtime settings (language, debug flags, etc.) from config_runtime.yaml
|
||||
from config_manager import config_manager
|
||||
config_manager.restore_runtime_settings()
|
||||
|
||||
# Initialize DM interaction analyzer
|
||||
if globals.OWNER_USER_ID and globals.OWNER_USER_ID != 0:
|
||||
init_dm_analyzer(globals.OWNER_USER_ID)
|
||||
|
||||
Reference in New Issue
Block a user