mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
Fix Docker restart crash: respect autoStart flag and persist identity
Root cause: on Docker restart, loadSavedBots() unconditionally connected ALL saved bots regardless of autoStart flag, causing a rapid connect/disconnect loop. Additionally, bot identities were regenerated on every restart, causing TS server conflicts with stale sessions. Changes: - loadSavedBots() now only auto-connects bots with autoStart=true - startBot/stopBot persist autoStart state so restart behavior matches user intent - Bot TS3 identity is persisted to database and reused across restarts - Database schema migrated to include identity column - TS3Client.connect() cleans up existing connection before reconnecting - Stagger bot connections by 1s to avoid overwhelming the TS server https://claude.ai/code/session_01L2kEV2M1QFWMCyPtLU5LgC
This commit is contained in:
4 files changed
+82
-15
No files matched your search
@@ -553,4 +553,8 @@ export class BotInstance extends EventEmitter {
|
||||
isConnected(): boolean {
|
||||
return this.connected;
|
||||
}
|
||||
|
||||
getIdentityExport(): string | undefined {
|
||||
return this.tsClient.getIdentityExport();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user