forked from Fascinated/Bat
make the help command better
This commit is contained in:
@ -89,6 +89,11 @@ public class CommandService extends ListenerAdapter {
|
||||
List<Command> discordCommands = jda.updateCommands().addCommands(commands.values().stream().map(BatCommand::getCommandData).toList()).complete();
|
||||
for (Command discordCommand : discordCommands) {
|
||||
commands.get(discordCommand.getName()).setCommandSnowflake(discordCommand.getIdLong());
|
||||
if (!discordCommand.getSubcommands().isEmpty()) {
|
||||
for (Command.Subcommand subCommand : discordCommand.getSubcommands()) {
|
||||
commands.get(discordCommand.getName()).getSubCommands().get(subCommand.getName()).setCommandSnowflake(subCommand.getIdLong());
|
||||
}
|
||||
}
|
||||
}
|
||||
log.info("Registered all slash commands in {}ms", System.currentTimeMillis() - before);
|
||||
}
|
||||
|
Reference in New Issue
Block a user