diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index c75878b3..200487b2 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -26,6 +26,8 @@ using NadekoBot.Services.Help; using System.IO; using NadekoBot.Services.Pokemon; using NadekoBot.DataStructures.ShardCom; +using NadekoBot.DataStructures; +using NadekoBot.Extensions; namespace NadekoBot { @@ -346,6 +348,10 @@ namespace NadekoBot var _ = await CommandService.AddModulesAsync(this.GetType().GetTypeInfo().Assembly); + bool isPublicNadeko = false; +#if GLOBAL_NADEKO + isPublicNadeko = true; +#endif //Console.WriteLine(string.Join(", ", CommandService.Commands // .Distinct(x => x.Name + x.Module.Name) // .SelectMany(x => x.Aliases) @@ -353,14 +359,14 @@ namespace NadekoBot // .Where(x => x.Count() > 1) // .Select(x => x.Key + $"({x.Count()})"))); -//unload modules which are not available on the public bot -#if GLOBAL_NADEKO - CommandService - .Modules - .ToArray() - .Where(x => x.Preconditions.Any(y => y.GetType() == typeof(NoPublicBot))) - .ForEach(x => CommandService.RemoveModuleAsync(x)); -#endif + //unload modules which are not available on the public bot + + if(isPublicNadeko) + CommandService + .Modules + .ToArray() + .Where(x => x.Preconditions.Any(y => y.GetType() == typeof(NoPublicBot))) + .ForEach(x => CommandService.RemoveModuleAsync(x)); Ready = true; _log.Info($"Shard {ShardId} ready.");