Remove Modules enumerable, change Commands to ILookup

This commit is contained in:
Finite Reality
2016-08-02 19:54:00 +01:00
parent dcd13e98e9
commit 3856d43587

View File

@@ -16,8 +16,7 @@ namespace Discord.Commands
private readonly ConcurrentDictionary<Type, TypeReader> _typeReaders;
private readonly CommandMap _map;
public IEnumerable<Module> Modules => _modules.Select(x => x.Value);
public IEnumerable<Command> Commands => _modules.SelectMany(x => x.Value.Commands);
public ILookup<Module, Command> Commands => _modules.SelectMany(x => x.Value.Commands).ToLookup(x => x.Module);
public CommandService()
{