diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/annotation/Button.java b/lib/src/main/java/net/tomatentum/marinara/interaction/annotation/Button.java index 0032484..6c23a2a 100644 --- a/lib/src/main/java/net/tomatentum/marinara/interaction/annotation/Button.java +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/annotation/Button.java @@ -1,5 +1,12 @@ package net.tomatentum.marinara.interaction.annotation; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) public @interface Button { - public String customId(); + public String value(); //aka customId } diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/methods/ButtonInteractionMethod.java b/lib/src/main/java/net/tomatentum/marinara/interaction/methods/ButtonInteractionMethod.java index 7e1014a..165dfa0 100644 --- a/lib/src/main/java/net/tomatentum/marinara/interaction/methods/ButtonInteractionMethod.java +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/methods/ButtonInteractionMethod.java @@ -34,7 +34,7 @@ public class ButtonInteractionMethod extends InteractionMethod { private void parseMethod() { Button button = getMethod().getAnnotation(Button.class); - this.customId = button.customId(); + this.customId = button.value(); } }