From c136c117d28c3c41a70d0946589b285588a853e0 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 1 Apr 2023 22:57:30 +0300 Subject: [PATCH] fix: log PluginLoadError guild id correctly --- backend/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 0b95cb90..b6fda953 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -61,8 +61,8 @@ const SAFE_TO_IGNORE_ERIS_ERROR_CODES = [ const SAFE_TO_IGNORE_ERIS_ERROR_MESSAGES = ["Server didn't acknowledge previous heartbeat, possible lost connection"]; function errorHandler(err) { - const guildName = err.guild?.name || "Global"; - const guildId = err.guild?.id || "0"; + const guildId = err.guild?.id || err.guildId || "0"; + const guildName = err.guild?.name || (guildId && guildId !== "0" ? "Unknown" : "Global"); if (err instanceof RecoverablePluginError) { // Recoverable plugin errors can be, well, recovered from.