Browse Source

Allow command groups to work correctly

tags/1.0-rc
FiniteReality 8 years ago
parent
commit
c05f44a544
1 changed files with 5 additions and 10 deletions
  1. +5
    -10
      src/Discord.Net.Commands/Module.cs

+ 5
- 10
src/Discord.Net.Commands/Module.cs View File

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


Loading…
Cancel
Save