From 3444ebbe22583a332d979d7fe7442642824fe0b4 Mon Sep 17 00:00:00 2001 From: Kappeh Date: Sat, 1 Feb 2025 01:42:25 +0000 Subject: [PATCH] Add command groups to the help command autocomplete list --- cipher_discord_bot/src/commands/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cipher_discord_bot/src/commands/mod.rs b/cipher_discord_bot/src/commands/mod.rs index 514229c..b1f28d3 100644 --- a/cipher_discord_bot/src/commands/mod.rs +++ b/cipher_discord_bot/src/commands/mod.rs @@ -32,9 +32,8 @@ where R: RepositoryProvider, { for command in commands { - if command.subcommands.is_empty() { - names.push(format!("{}{}", prefix, command.qualified_name.clone())); - } else { + names.push(format!("{}{}", prefix, command.qualified_name.clone())); + if !command.subcommands.is_empty() { let old_len = prefix.len(); prefix.push_str(&command.qualified_name); prefix.push(' ');