add retention and target and change the annotation parameter to "value" for easier usage
This commit is contained in:
		| @@ -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 | ||||
| } | ||||
|   | ||||
| @@ -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(); | ||||
|     } | ||||
|      | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user