Cleaned up a few internal command constructor, fixed subgroups not maintaining category

This commit is contained in:
RogueException
2016-01-18 22:52:16 -04:00
parent 33683e6ec7
commit f581434497
3 changed files with 18 additions and 13 deletions

View File

@@ -34,9 +34,9 @@ namespace Discord.Commands
Config = config;
_allCommands = new List<Command>();
_map = new CommandMap(null, "", "");
_map = new CommandMap();
_categories = new Dictionary<string, CommandMap>();
Root = new CommandGroupBuilder(this, "", null);
Root = new CommandGroupBuilder(this);
}
void IService.Install(DiscordClient client)
@@ -309,7 +309,7 @@ namespace Discord.Commands
string categoryName = command.Category ?? "";
if (!_categories.TryGetValue(categoryName, out category))
{
category = new CommandMap(null, "", "");
category = new CommandMap();
_categories.Add(categoryName, category);
}