Compare commits

...

2 Commits

2 changed files with 2 additions and 2 deletions

@ -45,7 +45,7 @@ public class InteractionRegistry {
defs.add(new ApplicationCommandDefinition(def.applicationCommand()).addExecutableCommand(def)); defs.add(new ApplicationCommandDefinition(def.applicationCommand()).addExecutableCommand(def));
}); });
defs.forEach(wrapper::registerApplicationCommand); wrapper.registerApplicationCommands(defs.toArray(new ApplicationCommandDefinition[0]));
} }
public void handle(Object context) { public void handle(Object context) {

@ -17,7 +17,7 @@ public abstract class LibraryWrapper {
interactionSubscriber = new ArrayList<>(); interactionSubscriber = new ArrayList<>();
} }
public abstract void registerApplicationCommand(ApplicationCommandDefinition def); public abstract void registerApplicationCommands(ApplicationCommandDefinition[] defs);
public void handleInteraction(Object context) { public void handleInteraction(Object context) {
interactionSubscriber.forEach((o) -> o.accept(context)); interactionSubscriber.forEach((o) -> o.accept(context));