remove unnecessary getClass call fixing test
All checks were successful
github-mirror / push-github (push) Successful in 4s
Build / Gradle-Build (push) Successful in 36s
Test / Gradle-Test (push) Successful in 40s

This commit is contained in:
tueem 2024-12-14 12:32:03 +01:00
parent 69b27e4554
commit f32c7045a1
Signed by: tueem
GPG Key ID: 65C8667EC17A88FB

@ -5,6 +5,7 @@ import net.tomatentum.marinara.interaction.commands.annotation.SlashCommandOptio
import net.tomatentum.marinara.interaction.commands.annotation.SlashCommandOptionChoice;
import net.tomatentum.marinara.interaction.commands.annotation.SubCommand;
import net.tomatentum.marinara.interaction.commands.annotation.SubCommandGroup;
import net.tomatentum.marinara.interaction.commands.annotation.SlashCommandOption.PlaceHolderEnum;
public record ExecutableSlashCommandDefinition(
SlashCommand applicationCommand,
@ -14,7 +15,7 @@ public record ExecutableSlashCommandDefinition(
public static SlashCommandOptionChoice[] getActualChoices(SlashCommandOption option) {
SlashCommandOptionChoice[] choices = option.choices();
if (choices.length <= 0)
if (choices.length <= 0 && !option.choiceEnum().equals(PlaceHolderEnum.class))
choices = EnumChoices.of(option.choiceEnum()).choices();
return choices;
}