fix(logging): update logger calls to use player logger for transport errors and API issues

This commit is contained in:
NoLogicAlan committed 2026-11-06 00:57:49 +03:00
1 parent aa56d98809
commit 8b99bd01dc
4 files changed
+20 -6

No files matched your search

+7
View File
@@ -574,6 +574,13 @@ const PlayerLifecycleMixin = {
player.textChannel = null;
logger.warn(`[PlayerManager] Cannot send player message in channel ${ch.id} — missing permissions`);
} else {
const status = err?.status ?? err?.statusCode;
const is5xx = status >= 500 && status < 600;
const isHtml = typeof err?.message === "string" && /<!doctype|<html/i.test(err.message);
if (is5xx || isHtml) {
logger.player(`[PlayerManager] Could not send player message in channel ${ch.id} (Fluxer API HTTP ${status || 503} unavailable)`);
return;
}
logger.warn(`[PlayerManager] Failed to send player message in channel ${ch.id}:`, err?.message ?? err);
}
});