From c05f44a5445b449051488199071985835326d020 Mon Sep 17 00:00:00 2001 From: FiniteReality Date: Wed, 31 Aug 2016 15:28:38 +0100 Subject: [PATCH] Allow command groups to work correctly --- src/Discord.Net.Commands/Module.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/Discord.Net.Commands/Module.cs b/src/Discord.Net.Commands/Module.cs index 7b74ffb87..7b8113252 100644 --- a/src/Discord.Net.Commands/Module.cs +++ b/src/Discord.Net.Commands/Module.cs @@ -60,17 +60,12 @@ namespace Discord.Commands if (groupAttrib != null) { string nextGroupPrefix; - if (groupAttrib.Prefix != null) - { - if (groupPrefix != "") - nextGroupPrefix = groupPrefix + " " + groupAttrib.Prefix ?? type.Name; - else - nextGroupPrefix = groupAttrib.Prefix ?? type.Name; - } + + if (groupPrefix != "") + nextGroupPrefix = groupPrefix + " " + (groupAttrib.Prefix ?? type.Name.ToLowerInvariant()); else - { - nextGroupPrefix = groupPrefix; - } + nextGroupPrefix = groupAttrib.Prefix ?? type.Name.ToLowerInvariant(); + SearchClass(type, ReflectionUtils.CreateObject(type, Service, dependencyMap), commands, nextGroupPrefix, dependencyMap); } }