From ca2a36b1d713a743045b15adf99eda69a6fdbec7 Mon Sep 17 00:00:00 2001 From: monbrey Date: Fri, 25 Jun 2021 06:57:11 +1000 Subject: [PATCH] fix(ApplicationCommand): stringType isn't supposed to be sent to the API (#5916) --- src/structures/ApplicationCommand.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/ApplicationCommand.js b/src/structures/ApplicationCommand.js index b3444406c..9b7be236a 100644 --- a/src/structures/ApplicationCommand.js +++ b/src/structures/ApplicationCommand.js @@ -212,7 +212,7 @@ class ApplicationCommand extends Base { static transformOption(option, received) { const stringType = typeof option.type === 'string' ? option.type : ApplicationCommandOptionTypes[option.type]; return { - type: typeof option.type === 'number' && !received ? option.type : stringType, + type: typeof option.type === 'number' && !received ? option.type : ApplicationCommandOptionTypes[option.type], name: option.name, description: option.description, required: