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
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:
@@ -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` +
|
||||
|
||||
Reference in New Issue
Block a user