Add Button Interaction with specific method parameter support.

This commit is contained in:
2024-11-05 15:54:49 +01:00
parent 11fd16fa77
commit 0ce0b3eb4f
3 changed files with 50 additions and 1 deletions

View File

@@ -17,7 +17,6 @@ public abstract class LibraryWrapper {
interactionSubscriber = new ArrayList<>();
}
public abstract void registerSlashCommands(SlashCommandDefinition[] defs);
public void handleInteraction(Object context) {
interactionSubscriber.forEach((o) -> o.accept(context));
@@ -31,6 +30,11 @@ public abstract class LibraryWrapper {
}
public abstract InteractionType getInteractionType(Class<?> clazz);
public abstract void registerSlashCommands(SlashCommandDefinition[] defs);
public abstract Object convertCommandOption(Object context, SlashCommandOptionType type, String optionName);
public abstract ExecutableSlashCommandDefinition getCommandDefinition(Object context);
public abstract String getButtonId(Object context);
public abstract Object getComponentContextObject(Object context, Class<?> type);
}