feat(config): implement loading and saving of bot node configuration with default notification settings

This commit is contained in:
2026-09-06 14:00:45 +08:00
parent 6a0c2d1fc4
commit ec1cf20347
3 changed files with 63 additions and 36 deletions
+7
View File
@@ -47,6 +47,13 @@ func main() {
log.Fatalf("Failed to load bot user config: %v", err)
}
// Load the node registry config. Unlike the other files it is optional:
// missing or empty bot_node_config.json simply means every node keeps its
// default enableStatusNotify (true).
if err := config.LoadBotNodeConfig(global.ConfigPath.BotNodeConfig); err != nil {
log.Fatalf("Failed to load bot node config: %v", err)
}
// Initialize logging.
postLog.SetDebugMode(cfg.System.DebugMode)
postLog.InitLogBroadcaster()