From f32c7045a1d96a7d2e1f131a631f88dd7500338b Mon Sep 17 00:00:00 2001 From: tueem Date: Sat, 14 Dec 2024 12:32:03 +0100 Subject: [PATCH] remove unnecessary getClass call fixing test --- .../interaction/commands/ExecutableSlashCommandDefinition.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ExecutableSlashCommandDefinition.java b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ExecutableSlashCommandDefinition.java index 543311c..6505984 100644 --- a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ExecutableSlashCommandDefinition.java +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/ExecutableSlashCommandDefinition.java @@ -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; }