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); } }