mirror of
https://github.com/System-End/Discord-MC-Chat.git
synced 2026-04-19 22:05:11 +00:00
Enhance HelpCommand output to include command arguments descriptions
This commit is contained in:
parent
64735a9475
commit
aab632eb34
1 changed files with 7 additions and 2 deletions
|
|
@ -34,8 +34,13 @@ public class HelpCommand implements Command {
|
|||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("========== ").append(I18nManager.getDmccTranslation("commands.help.help")).append(" ==========\n");
|
||||
|
||||
CommandManager.getCommands().stream().sorted(Comparator.comparing(Command::name)).forEach(cmd -> builder
|
||||
.append("\n").append("- ").append(cmd.name()).append(": ").append(cmd.description()));
|
||||
CommandManager.getCommands().stream().sorted(Comparator.comparing(Command::name)).forEach(cmd -> {
|
||||
builder.append("\n").append("- ").append(cmd.name()).append(": ").append(cmd.description());
|
||||
|
||||
for (Command.CommandArgument arg : cmd.args()) {
|
||||
builder.append("\n ").append("<").append(arg.name()).append(">: ").append(arg.description());
|
||||
}
|
||||
});
|
||||
|
||||
sender.reply(builder.toString());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue