mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(ApplicationCommand): stringType isn't supposed to be sent to the API (#5916)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user