From 8480407167abfd6051a7574ba1c3f6d886f0d87f Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 31 Jul 2026 19:46:07 +0700 Subject: [PATCH] =?UTF-8?q?fix(automod):=20parenthesize=20=3F=3F=20chain?= =?UTF-8?q?=20in=20autoDeleteNotify=20=E2=80=94=20Node=20runtime=20SyntaxE?= =?UTF-8?q?rror?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TS compiled this fine, but the JS spec forbids mixing || and ?? without explicit parens; Node threw 'Unexpected token ??' at startup, crash-looping gmw-discord-gateway (restart counter 250). Wrap the fallback chain in parens so the expression is valid. --- .../src/modules/ai-moderation/autoDeleteNotify.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/discord-gateway/src/modules/ai-moderation/autoDeleteNotify.ts b/services/discord-gateway/src/modules/ai-moderation/autoDeleteNotify.ts index 9fc78b5..b6ee13e 100644 --- a/services/discord-gateway/src/modules/ai-moderation/autoDeleteNotify.ts +++ b/services/discord-gateway/src/modules/ai-moderation/autoDeleteNotify.ts @@ -25,9 +25,7 @@ export async function sendDeletionNotification( const analysis = (message.ai_analysis ?? "").trim(); const reason: string = (analysis.length > 240 ? `${analysis.slice(0, 240)}…` : analysis) || - message.ai_categories ?? - message.ai_moderation_flags ?? - "(unknown)"; + (message.ai_categories ?? message.ai_moderation_flags ?? "(unknown)"); await targetUser.send( `Pesan Anda di **${guildName}** telah dihapus oleh sistem moderasi otomatis.\n` + `Alasan: ${reason}\n` +