diff --git a/src/core/Bot.mjs b/src/core/Bot.mjs index 1825357..7e9153e 100644 --- a/src/core/Bot.mjs +++ b/src/core/Bot.mjs @@ -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(); diff --git a/src/services/StatusChannelManager.mjs b/src/services/StatusChannelManager.mjs index 9d9e4f6..39553d1 100644 --- a/src/services/StatusChannelManager.mjs +++ b/src/services/StatusChannelManager.mjs @@ -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;