escalation: drop dead 'reason' param — never populated, always logged as null

The /escalate slash command never had a reason option in its definition
(commands/register.js only takes a 'level' option), so handleEscalate
hardcoded reason=null. The escalate button path passed null explicitly.
The log line wrote it verbatim as "Reason: null" on every escalate.

Remove the dead surface:
- runEscalation signature drops the reason parameter.
- The customer-facing email body drops the conditional reason suffix
  (`reason ? `\n\nReason: ${reason}` : ''`) — always-false branch.
- The logging-channel post drops "\nReason: ${reason}".
- handleEscalate drops the `const reason = null;` line and the call-site arg.
- handleEscalateButton (handlers/buttons.js) drops the trailing `null` arg.

If we ever want to capture a reason, the slash command would need a
StringOption('reason') and an escalate-modal for the button path —
neither exists today.
This commit is contained in:
2026-05-19 20:20:03 +00:00
parent 2152544d09
commit 837fd10984
2 changed files with 5 additions and 6 deletions

View File

@@ -370,7 +370,7 @@ async function handleEscalateButton(interaction, ticket) {
});
}
await runDeferred(interaction, 'escalate', () => runEscalation(interaction, ticket, tier, null));
await runDeferred(interaction, 'escalate', () => runEscalation(interaction, ticket, tier));
}
async function handleDeescalateButton(interaction, ticket) {