From 3856d435876b4aab3833ba09fe2c878071be3a0a Mon Sep 17 00:00:00 2001 From: Finite Reality Date: Tue, 2 Aug 2016 19:54:00 +0100 Subject: [PATCH] Remove Modules enumerable, change Commands to ILookup --- src/Discord.Net.Commands/CommandService.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Discord.Net.Commands/CommandService.cs b/src/Discord.Net.Commands/CommandService.cs index 2ce7c5517..3ecd77c1d 100644 --- a/src/Discord.Net.Commands/CommandService.cs +++ b/src/Discord.Net.Commands/CommandService.cs @@ -16,8 +16,7 @@ namespace Discord.Commands private readonly ConcurrentDictionary _typeReaders; private readonly CommandMap _map; - public IEnumerable Modules => _modules.Select(x => x.Value); - public IEnumerable Commands => _modules.SelectMany(x => x.Value.Commands); + public ILookup Commands => _modules.SelectMany(x => x.Value.Commands).ToLookup(x => x.Module); public CommandService() {