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