fix(ApplicationCommand): stringType isn't supposed to be sent to the API (#5916)

This commit is contained in:
monbrey
2021-06-25 06:57:11 +10:00
committed by GitHub
parent 7346621d15
commit ca2a36b1d7

View File

@@ -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: