Compare commits
2 Commits
0c9d8ecb53
...
cf45d0e8ea
Author | SHA1 | Date | |
---|---|---|---|
cf45d0e8ea | |||
4a13899975 |
@ -45,7 +45,7 @@ public class InteractionRegistry {
|
||||
defs.add(new ApplicationCommandDefinition(def.applicationCommand()).addExecutableCommand(def));
|
||||
});
|
||||
|
||||
defs.forEach(wrapper::registerApplicationCommand);
|
||||
wrapper.registerApplicationCommands(defs.toArray(new ApplicationCommandDefinition[0]));
|
||||
}
|
||||
|
||||
public void handle(Object context) {
|
||||
|
@ -17,7 +17,7 @@ public abstract class LibraryWrapper {
|
||||
interactionSubscriber = new ArrayList<>();
|
||||
}
|
||||
|
||||
public abstract void registerApplicationCommand(ApplicationCommandDefinition def);
|
||||
public abstract void registerApplicationCommands(ApplicationCommandDefinition[] defs);
|
||||
|
||||
public void handleInteraction(Object context) {
|
||||
interactionSubscriber.forEach((o) -> o.accept(context));
|
||||
|
Loading…
x
Reference in New Issue
Block a user