diff options
| author | Lakelezz <[email protected]> | 2018-09-11 18:54:28 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-09-11 18:54:28 +0200 |
| commit | 823b8299bb88013ce900e2f8d4b5745556380c72 (patch) | |
| tree | 2b6bb8faab26af1eda6e5a71fdc0aba6242ce481 /src/framework | |
| parent | Add single group help (#385) (diff) | |
| download | serenity-823b8299bb88013ce900e2f8d4b5745556380c72.tar.xz serenity-823b8299bb88013ce900e2f8d4b5745556380c72.zip | |
Add missing usage on plain help (#386)
Diffstat (limited to 'src/framework')
| -rw-r--r-- | src/framework/standard/help_commands.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/framework/standard/help_commands.rs b/src/framework/standard/help_commands.rs index f7c6b48..7104525 100644 --- a/src/framework/standard/help_commands.rs +++ b/src/framework/standard/help_commands.rs @@ -775,7 +775,7 @@ fn grouped_commands_to_plain_string( result } -/// Turns a single into a `String` taking plain help format into account. +/// Turns a single command into a `String` taking plain help format into account. fn single_command_to_plain_string(help_options: &HelpOptions, command: &Command) -> String { let mut result = String::default(); let _ = writeln!(result, "**{}**", command.name); @@ -788,6 +788,10 @@ fn single_command_to_plain_string(help_options: &HelpOptions, command: &Command) let _ = writeln!(result, "**{}**: {}", help_options.description_label, description); }; + if let &Some(ref usage) = &command.usage { + let _ = writeln!(result, "**{}**: {}", help_options.usage_label, usage); + } + let _ = writeln!(result, "**{}**: {}", help_options.grouped_label, command.group_name); let _ = writeln!(result, "**{}**: {}", help_options.available_text, command.availability); |