mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
fix(status): resolve audioNode incident on nodeConnect and add status card self-healing
- Listen for Lavalink nodeConnect event in Bot.mjs to resolve audioNode incidents on connection - Check audio node connection status immediately after LavalinkManager.init() - Add auto-resolution self-healing in StatusChannelManager if audio node or gateway is active
This commit is contained in:
1 parent
3815f131cf
commit
6936060ec8
2 files changed
+18
No files matched your search
@@ -394,6 +394,13 @@ class Remix {
|
||||
this.players?.resumeAllOnNodeReconnect?.();
|
||||
}
|
||||
});
|
||||
this.lavalink.on("nodeConnect", (node) => {
|
||||
logger.lavalink("[Lavalink] Node connected: " + (node?.id ?? "main"));
|
||||
this.statusChannel?.resolveIncident("audioNode");
|
||||
if (this._hasBooted) {
|
||||
this.players?.resumeAllOnNodeReconnect?.();
|
||||
}
|
||||
});
|
||||
this.lavalink.on("nodeReconnect", () => {
|
||||
this.statusChannel?.resolveIncident("audioNode");
|
||||
if (this._hasBooted) {
|
||||
@@ -426,6 +433,9 @@ class Remix {
|
||||
});
|
||||
await this.lavalink.init();
|
||||
this.playerContext.lavalink = this.lavalink;
|
||||
if (this.lavalink?._nodeConnected || Boolean(this.lavalink?.getNode?.())) {
|
||||
this.statusChannel?.resolveIncident("audioNode");
|
||||
}
|
||||
}
|
||||
|
||||
this.gatewayHandler.onReady();
|
||||
|
||||
@@ -369,6 +369,14 @@ export class StatusChannelManager {
|
||||
list.push({ name: inc.name, status: `⚪ ${this.t("responses.statusChannel.disabled")}` });
|
||||
continue;
|
||||
}
|
||||
if (key === "audioNode" && inc.down && (this.remix.lavalink?._nodeConnected || Boolean(this.remix.lavalink?.getNode?.()))) {
|
||||
/* Self-heal: audio engine node is connected and operational */
|
||||
this.resolveIncident("audioNode", "Audio engine reconnected successfully").catch?.(() => {});
|
||||
}
|
||||
if (key === "gateway" && inc.down && this.remix._gatewayConnected) {
|
||||
/* Self-heal: gateway connection is operational */
|
||||
this.resolveIncident("gateway", "Fluxer Gateway reconnected").catch?.(() => {});
|
||||
}
|
||||
if (inc.down) {
|
||||
list.push({ name: inc.name, status: `🔴 ${this.t("responses.statusChannel.outage")}` });
|
||||
if (inc.impact === "Critical") hasCriticalDown = true;
|
||||
|
||||
Reference in new issue
Block a user