mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-05 18:27:18 +00:00
Merge pull request #530 from seeyebe/fix/slashcmd-case-types-enum-filter
Fix: Filter numeric enum keys from case type slash command options
This commit is contained in:
commit
32e390e939
1 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,9 @@ export const AddCaseSlashCmd = modActionsSlashCmd({
|
|||
name: "type",
|
||||
description: "The type of case to add",
|
||||
required: true,
|
||||
choices: Object.keys(CaseTypes).map((type) => ({ name: type, value: type })),
|
||||
choices: Object.keys(CaseTypes)
|
||||
.filter((key) => isNaN(Number(key)))
|
||||
.map((key) => ({ name: key, value: key })),
|
||||
}),
|
||||
slashOptions.user({ name: "user", description: "The user to add a case to", required: true }),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue