Browse Source

Remove Modules enumerable, change Commands to ILookup

pull/178/head
Finite Reality 9 years ago
parent
commit
3856d43587
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/Discord.Net.Commands/CommandService.cs

+ 1
- 2
src/Discord.Net.Commands/CommandService.cs View File

@@ -16,8 +16,7 @@ namespace Discord.Commands
private readonly ConcurrentDictionary<Type, TypeReader> _typeReaders; private readonly ConcurrentDictionary<Type, TypeReader> _typeReaders;
private readonly CommandMap _map; 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() public CommandService()
{ {


Loading…
Cancel
Save