diff --git a/src/helpers/functions/handleError.ts b/src/helpers/functions/handleError.ts index 8c325317..6a470059 100644 --- a/src/helpers/functions/handleError.ts +++ b/src/helpers/functions/handleError.ts @@ -87,7 +87,7 @@ export async function handleError(client: Client, error: any, type: string) { const codeBlocks = error.stack ? "" : "json"; if (error instanceof DiscordAPIError) - // not on our end + // discord's problem (usually), not ours return console.error(error, type, description); // silence EPROTO errors diff --git a/src/helpers/logger.ts b/src/helpers/logger.ts index 8d770915..0c31be26 100644 --- a/src/helpers/logger.ts +++ b/src/helpers/logger.ts @@ -26,8 +26,8 @@ export async function devLogger(client: Client, description: string, params: Log const channel = client.channels.cache.get(client.tokens.errorChannel) as TextChannel; if (!channel) return; // avoid infinite loop when crash is outside of client - if (params.codeBlocks !== null && params.codeBlocks !== undefined) - description = `\`\`\`${params.codeBlocks}\n${description}\`\`\``; + // empty strings still enable codeblocks, just no highlighting + if (params.codeBlocks != null) description = `\`\`\`${params.codeBlocks}\n${description}\`\`\``; const embed = new EmbedBuilder() .setTitle(params.title ?? "Unhandled Rejection")