diff --git a/src/AzzyBot-Next.Bot/Utilities/AzzyHelp.cs b/src/AzzyBot-Next.Bot/Utilities/AzzyHelp.cs index 724a5299..e93a882f 100644 --- a/src/AzzyBot-Next.Bot/Utilities/AzzyHelp.cs +++ b/src/AzzyBot-Next.Bot/Utilities/AzzyHelp.cs @@ -40,7 +40,9 @@ public static AzzyHelpRecord GetSingleCommand(IReadOnlyDictionary r.Value.Any(c => c.Name == commandName)).Value.FirstOrDefault() ?? throw new InvalidOperationException("Command not found"); + string[] parts = commandName.Split(' '); + + return GetCommandGroups(commands, adminServer, approvedDebug, member, true).Where(c => c.Key == parts[0]).SelectMany(r => r.Value).FirstOrDefault(c => c.Name == commandName) ?? throw new InvalidOperationException($"Command not found: {commandName}"); } private static Dictionary> GetCommandGroups(IReadOnlyDictionary commands, bool adminServer, bool approvedDebug, DiscordMember member, bool singleCommand = false)