Add Button Interaction Implementation #4
@@ -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