Skip to content

Commit

Permalink
feat: register commands as event listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
qixils committed Jan 12, 2024
1 parent 1e9a878 commit e840f69
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ private SlashCommandDataBranch createSlashSubCommandData(@NonNull SlashCommandDa
}

public Collection<Command<?>> parse(Object object) {
commandManager.getLibrary().getJDA().addEventListener(object);
commandManager.getLibrary().getEventDispatcher().registerListeners(object);

Class<?> parentClass = object.getClass();
SlashCommand parentCommandData = parentClass.getAnnotation(SlashCommand.class);
SlashCommandData parentCommand = parentCommandData == null
Expand Down

0 comments on commit e840f69

Please sign in to comment.