cleanup how i add sub commands to the commands

This commit is contained in:
Lee
2024-06-25 11:19:51 +01:00
parent 39c3d471c7
commit b37a30b0a3
3 changed files with 15 additions and 13 deletions

View File

@ -55,19 +55,10 @@ public class CommandService extends ListenerAdapter {
DiscordService.JDA.addEventListener(this);
// Guild commands
// todo: add some, duh
registerCommand(context.getBean(UserFeedCommand.class));
// Global commands
registerCommand(context.getBean(ScoreSaberCommand.class)
.addSubCommand("link", context.getBean(LinkSubCommand.class))
.addSubCommand("user", context.getBean(cc.fascinated.bat.features.scoresaber.command.scoresaber.UserSubCommand.class))
.addSubCommand("me", context.getBean(MeSubCommand.class))
);
registerCommand(context.getBean(UserFeedCommand.class)
.addSubCommand("user", context.getBean(UserSubCommand.class))
.addSubCommand("channel", context.getBean(ChannelSubCommand.class))
.addSubCommand("clear-users", context.getBean(ClearUsersSubCommand.class))
);
registerCommand(context.getBean(ScoreSaberCommand.class));
registerSlashCommands(); // Register all slash commands
}