diff --git a/src/core/Bot.mjs b/src/core/Bot.mjs index 04a88a9..70435d0 100644 --- a/src/core/Bot.mjs +++ b/src/core/Bot.mjs @@ -643,7 +643,7 @@ class Remix { const now = Date.now(); if (now - _wsErrorCooldown.lastLogged < _wsErrorCooldown.COOLDOWN_MS) return; _wsErrorCooldown.lastLogged = now; - logger.warn(`[WS] ${label} transport error (auto-recovering): ${err?.message ?? err}`); + logger.player(`[WS] ${label} transport error (auto-recovering): ${err?.message ?? err}`); }; const attachToSocket = (wsObj, label) => { diff --git a/src/core/ErrorChannel.mjs b/src/core/ErrorChannel.mjs index eae8b37..abe7893 100644 --- a/src/core/ErrorChannel.mjs +++ b/src/core/ErrorChannel.mjs @@ -326,7 +326,14 @@ function _forward(level, tag, args) { /** @private Format values the same way console would. */ function _formatArgs(args) { try { - return util.format(...args).trim(); + let text = util.format(...args).trim(); + if (/([^<]+)<\/title>/i); + const hint = match ? match[1] : "503"; + text = text.replace(/= 500 && status < 600; + const isHtml = typeof err?.message === "string" && / { const code = eventOrCode?.code ?? (typeof eventOrCode === "number" ? eventOrCode : "unknown"); @@ -344,7 +344,7 @@ class GatewayHandler { const now = Date.now(); if (now - _wsErrorCooldown.lastLogged >= _wsErrorCooldown.COOLDOWN_MS) { _wsErrorCooldown.lastLogged = now; - logger.warn(`[Gateway] Raw WebSocket closed (code=${code}, reason=${reason || "none"}) — proactively reconnecting shards.`); + logger.player(`[Gateway] Raw WebSocket closed (code=${code}, reason=${reason || "none"}) — proactively reconnecting shards.`); } /* Immediately attempt proactive shard reconnect */ for (const [id, shard] of ShardingUtils.getLocalShards(remix.client)) {