refactor(command): move both choices vars to different annotation
All checks were successful
github-mirror / push-github (push) Successful in 1m36s
Build / Gradle-Build (push) Successful in 31s
Publish / Gradle-Publish (push) Successful in 36s
Test / Gradle-Test (push) Successful in 47s

This commit is contained in:
2025-03-18 09:33:53 +01:00
parent 2e5979e6e4
commit caa2ee7089
5 changed files with 19 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import discord4j.core.event.domain.interaction.ChatInputInteractionEvent;
import net.tomatentum.marinara.interaction.InteractionHandler;
import net.tomatentum.marinara.interaction.commands.annotation.CommandChoices;
import net.tomatentum.marinara.interaction.commands.annotation.SlashCommand;
import net.tomatentum.marinara.interaction.commands.annotation.SlashCommandOption;
import net.tomatentum.marinara.interaction.commands.option.SlashCommandOptionType;
@@ -20,7 +21,7 @@ public class TestCommand implements InteractionHandler {
name = "foo",
description = "foo bar is very fooby",
type = SlashCommandOptionType.STRING,
choiceEnum = TestChoiceEnum.class
choices = @CommandChoices(cenum = TestChoiceEnum.class)
)
}
)

View File

@@ -5,6 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import org.javacord.api.interaction.SlashCommandInteraction;
import net.tomatentum.marinara.interaction.InteractionHandler;
import net.tomatentum.marinara.interaction.commands.annotation.CommandChoices;
import net.tomatentum.marinara.interaction.commands.annotation.SlashCommand;
import net.tomatentum.marinara.interaction.commands.annotation.SlashCommandOption;
import net.tomatentum.marinara.interaction.commands.option.SlashCommandOptionType;
@@ -21,7 +22,7 @@ public class TestCommand implements InteractionHandler {
name = "foo",
description = "foo bar is very fooby",
type = SlashCommandOptionType.STRING,
choiceEnum = TestChoiceEnum.class
choices = @CommandChoices(cenum = TestChoiceEnum.class)
)
}
)