fix(automod): parenthesize ?? chain in autoDeleteNotify — Node runtime SyntaxError
Build & Deploy (Nix) / build-and-deploy (backend) (push) Successful in 3m4s
Build & Deploy (Nix) / build-and-deploy (discord-gateway) (push) Successful in 2m22s
Build & Deploy (Nix) / build-and-deploy (proxy) (push) Successful in 2m31s

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.
This commit is contained in:
Developer
2026-07-31 19:46:07 +07:00
parent 1249ae81d8
commit 8480407167
@@ -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` +