diff --git a/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs b/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs index d7a7bbdf..094baf4d 100644 --- a/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/CleverBotCommands.cs @@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Games { var bot = ChatterBotFactory.Create(ChatterBotType.CLEVERBOT); CleverbotGuilds = new ConcurrentDictionary( - uow.GuildConfigs.GetAll() + NadekoBot.AllGuildConfigs .Where(gc => gc.CleverbotEnabled) .ToDictionary(gc => gc.GuildId, gc => bot.CreateSession())); } diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index 3ee8e2e5..cb7f1dec 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -46,7 +46,7 @@ namespace NadekoBot using (var uow = DbHandler.UnitOfWork()) { - AllGuildConfigs = uow.GuildConfigs.GetAll(); + AllGuildConfigs = uow.GuildConfigs.GetAllGuildConfigs(); } } diff --git a/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs b/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs index 4e9b0f09..1fc9015d 100644 --- a/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs @@ -11,6 +11,7 @@ namespace NadekoBot.Services.Database.Repositories GuildConfig For(ulong guildId, Func, IQueryable> includes = null); GuildConfig PermissionsFor(ulong guildId); IEnumerable PermissionsForAll(); + IEnumerable GetAllGuildConfigs(); GuildConfig SetNewRootPermission(ulong guildId, Permission p); IEnumerable GetAllFollowedStreams(); void SetCleverbotEnabled(ulong id, bool cleverbotEnabled); diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs index 02c287f3..dc857b8b 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs @@ -13,7 +13,7 @@ namespace NadekoBot.Services.Database.Repositories.Impl { } - public new IEnumerable GetAll() => + public IEnumerable GetAllGuildConfigs() => _set.Include(gc => gc.LogSetting) .ThenInclude(ls => ls.IgnoredChannels) .Include(gc => gc.LogSetting)