diff options
Diffstat (limited to 'src/framework')
| -rw-r--r-- | src/framework/standard/help_commands.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/framework/standard/help_commands.rs b/src/framework/standard/help_commands.rs index 4953b21..ca8fdc6 100644 --- a/src/framework/standard/help_commands.rs +++ b/src/framework/standard/help_commands.rs @@ -489,7 +489,9 @@ fn create_command_group_commands_pair_from_groups<'a, H: BuildHasher>( &help_options, ); - listed_groups.push(group_with_cmds); + if !group_with_cmds.command_names.is_empty() { + listed_groups.push(group_with_cmds); + } } listed_groups @@ -553,10 +555,12 @@ pub fn create_customised_help_data<'a, H: BuildHasher>( &help_options ); - return CustomisedHelpData::GroupedCommands { - help_description: group.description.clone().unwrap_or_default(), - groups: vec![single_group], - }; + if !single_group.command_names.is_empty() { + return CustomisedHelpData::GroupedCommands { + help_description: group.description.clone().unwrap_or_default(), + groups: vec![single_group], + }; + } } } |