diff --git a/wrapper/javacord/src/test/java/net/tomatentum/marinara/test/TestChoiceEnum.java b/wrapper/javacord/src/test/java/net/tomatentum/marinara/test/TestChoiceEnum.java new file mode 100644 index 0000000..1c7fd0a --- /dev/null +++ b/wrapper/javacord/src/test/java/net/tomatentum/marinara/test/TestChoiceEnum.java @@ -0,0 +1,20 @@ +package net.tomatentum.marinara.test; + +import net.tomatentum.marinara.interaction.commands.ChoiceValueProvider; + +public enum TestChoiceEnum implements ChoiceValueProvider { + TestValue("testValue"), + FooBar("fooBar"), + Spongebob("spongebob"); + + private String value; + + private TestChoiceEnum(String value) { + this.value = value; + } + @Override + public String getChoiceValue() { + return value; + } + +} diff --git a/wrapper/javacord/src/test/java/net/tomatentum/marinara/test/TestCommand.java b/wrapper/javacord/src/test/java/net/tomatentum/marinara/test/TestCommand.java index f6710b0..2716fea 100644 --- a/wrapper/javacord/src/test/java/net/tomatentum/marinara/test/TestCommand.java +++ b/wrapper/javacord/src/test/java/net/tomatentum/marinara/test/TestCommand.java @@ -20,7 +20,8 @@ public class TestCommand implements InteractionHandler { @SlashCommandOption( name = "foo", description = "foo bar is very fooby", - type = SlashCommandOptionType.STRING + type = SlashCommandOptionType.STRING, + choiceEnum = TestChoiceEnum.class ) } )