From 480c1ec81f5413c642c8d47f3fcc4183872e7844 Mon Sep 17 00:00:00 2001 From: tueem Date: Thu, 7 Nov 2024 11:50:09 +0100 Subject: [PATCH] add Button Interaction Method case to factory method --- .../marinara/interaction/methods/InteractionMethod.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/methods/InteractionMethod.java b/lib/src/main/java/net/tomatentum/marinara/interaction/methods/InteractionMethod.java index b84f755..0f6b09e 100644 --- a/lib/src/main/java/net/tomatentum/marinara/interaction/methods/InteractionMethod.java +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/methods/InteractionMethod.java @@ -9,6 +9,7 @@ import java.util.List; import net.tomatentum.marinara.interaction.InteractionHandler; import net.tomatentum.marinara.interaction.InteractionType; +import net.tomatentum.marinara.interaction.annotation.Button; import net.tomatentum.marinara.interaction.commands.annotation.SlashCommand; import net.tomatentum.marinara.interaction.commands.annotation.SubCommand; import net.tomatentum.marinara.wrapper.LibraryWrapper; @@ -18,7 +19,8 @@ public abstract class InteractionMethod { public static InteractionMethod create(Method method, InteractionHandler handler, LibraryWrapper wrapper) { if (method.isAnnotationPresent(SlashCommand.class) || method.isAnnotationPresent(SubCommand.class)) return new SlashCommandInteractionMethod(method, handler, wrapper); - + if (method.isAnnotationPresent(Button.class)) + return new ButtonInteractionMethod(method, handler, wrapper); return null; }