change: getInteractionType check changed from class based to context based check
This commit is contained in:
		| @@ -66,7 +66,7 @@ public class InteractionRegistry { | ||||
|     } | ||||
|  | ||||
|     public void handle(Object context) { | ||||
|         InteractionType type = marinara.getWrapper().getInteractionType(context.getClass()); | ||||
|         InteractionType type = marinara.getWrapper().getInteractionType(context); | ||||
|         logger.debug("Received {} interaction ", context); | ||||
|         interactionMethods.forEach((m) -> { | ||||
|             if (m.getType().equals(type) && m.canRun(context)) { | ||||
|   | ||||
| @@ -29,7 +29,7 @@ public abstract class LibraryWrapper { | ||||
|         interactionSubscriber.remove(consumer); | ||||
|     } | ||||
|  | ||||
|     public abstract InteractionType getInteractionType(Class<?> clazz); | ||||
|     public abstract InteractionType getInteractionType(Object context); | ||||
|  | ||||
|     public abstract void registerSlashCommands(SlashCommandDefinition[] defs);  | ||||
|     public abstract Object convertCommandOption(Object context, SlashCommandOptionType type, String optionName); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user