mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 13:02:49 +08:00
fix: 停止机器人后UI消失 & UDP send error日志刷屏
- botDisconnected事件改为更新状态而非删除,停止机器人后正确显示离线状态 - 节流UDP send error日志,2秒内重复错误只输出一条汇总 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d0d2f57066
commit
43004fc44a
3 files changed
+43
-3
No files matched your search
@@ -65,7 +65,11 @@ export function setupWebSocket(
|
||||
};
|
||||
|
||||
const onDisconnected = () => {
|
||||
broadcast({ type: "botDisconnected", botId: bot.id });
|
||||
broadcast({
|
||||
type: "botDisconnected",
|
||||
botId: bot.id,
|
||||
status: bot.getStatus(),
|
||||
});
|
||||
};
|
||||
|
||||
bot.on("stateChange", onStateChange);
|
||||
|
||||
Reference in new issue
Block a user