Add Button Interaction Implementation #4

Merged
tueem merged 11 commits from feat/buttons into master 2024-11-08 13:41:22 +00:00
2 changed files with 9 additions and 2 deletions
Showing only changes of commit 7d9e14eb25 - Show all commits

View File

@ -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
}

View File

@ -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();
}
}