aboutsummaryrefslogtreecommitdiff
path: root/src/api/Commands/index.ts
diff options
context:
space:
mode:
authorMai <oudom.hou567@gmail.com>2022-10-14 11:21:44 +0000
committerGitHub <noreply@github.com>2022-10-14 13:21:44 +0200
commit2cb6c23347e3305ee04367c2bf2d6e6603a09839 (patch)
tree80a1d304d24fe5392a1c2d73af8a9a48b6dd5e91 /src/api/Commands/index.ts
parent87b6d6ab12d41cc8a215a25376990974a0128198 (diff)
downloadVencord-2cb6c23347e3305ee04367c2bf2d6e6603a09839.tar.gz
Vencord-2cb6c23347e3305ee04367c2bf2d6e6603a09839.tar.bz2
Vencord-2cb6c23347e3305ee04367c2bf2d6e6603a09839.zip
add choices to CommandsAPI Options (#94)
Diffstat (limited to 'src/api/Commands/index.ts')
-rw-r--r--src/api/Commands/index.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/api/Commands/index.ts b/src/api/Commands/index.ts
index be65646..6f18f10 100644
--- a/src/api/Commands/index.ts
+++ b/src/api/Commands/index.ts
@@ -68,6 +68,8 @@ function modifyOpt(opt: Option | Command) {
// See comment above Placeholders
if (opt === OptPlaceholder) opts[i] = OptionalMessageOption;
else if (opt === ReqPlaceholder) opts[i] = RequiredMessageOption;
+ opt.choices?.forEach(x => x.displayName ||= x.name);
+
modifyOpt(opts[i]);
});
}