fix check for string or integer option

This commit is contained in:
Marius Begby committed 2023-12-17 23:19:31 +01:00
1 parent 57ff7d56e2
commit 01fbd5e60a
1 file changed
+3 -1
+3 -1
View File
@@ -132,9 +132,11 @@ export function localizeCommand(command: Omit<SlashCommandBuilder, 'addSubcomman
if (localeOptionData.description) { if (localeOptionData.description) {
option.description_localizations[locale] = localeOptionData.description; option.description_localizations[locale] = localeOptionData.description;
} }
if ( if (
localeOptionData.choices && localeOptionData.choices &&
option.type === (ApplicationCommandOptionType.String || ApplicationCommandOptionType.Integer) && (option.type === ApplicationCommandOptionType.String ||
option.type === ApplicationCommandOptionType.Integer) &&
option.choices option.choices
) { ) {
for (const choice of option.choices) { for (const choice of option.choices) {