From 4896524d1a033299a453b782e11e0bcbe18f183c Mon Sep 17 00:00:00 2001 From: james7132 Date: Sun, 27 Nov 2016 01:36:16 -0800 Subject: [PATCH] Limit CommandService.Modules to top level modules --- src/Discord.Net.Commands/CommandService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.Commands/CommandService.cs b/src/Discord.Net.Commands/CommandService.cs index b6659fea3..3bac40634 100644 --- a/src/Discord.Net.Commands/CommandService.cs +++ b/src/Discord.Net.Commands/CommandService.cs @@ -22,7 +22,7 @@ namespace Discord.Commands internal readonly bool _caseSensitive; internal readonly RunMode _defaultRunMode; - public IEnumerable Modules => _moduleDefs.Select(x => x); + public IEnumerable Modules => _moduleDefs.Where(x => !x.IsSubmodule); public IEnumerable Commands => _moduleDefs.SelectMany(x => x.Commands); public CommandService() : this(new CommandServiceConfig()) { }