Improved startup time hopefuly
This commit is contained in:
parent
39f3ee0190
commit
607f7b4b36
@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Games
|
||||
{
|
||||
var bot = ChatterBotFactory.Create(ChatterBotType.CLEVERBOT);
|
||||
CleverbotGuilds = new ConcurrentDictionary<ulong, ChatterBotSession>(
|
||||
uow.GuildConfigs.GetAll()
|
||||
NadekoBot.AllGuildConfigs
|
||||
.Where(gc => gc.CleverbotEnabled)
|
||||
.ToDictionary(gc => gc.GuildId, gc => bot.CreateSession()));
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ namespace NadekoBot
|
||||
|
||||
using (var uow = DbHandler.UnitOfWork())
|
||||
{
|
||||
AllGuildConfigs = uow.GuildConfigs.GetAll();
|
||||
AllGuildConfigs = uow.GuildConfigs.GetAllGuildConfigs();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ namespace NadekoBot.Services.Database.Repositories
|
||||
GuildConfig For(ulong guildId, Func<DbSet<GuildConfig>, IQueryable<GuildConfig>> includes = null);
|
||||
GuildConfig PermissionsFor(ulong guildId);
|
||||
IEnumerable<GuildConfig> PermissionsForAll();
|
||||
IEnumerable<GuildConfig> GetAllGuildConfigs();
|
||||
GuildConfig SetNewRootPermission(ulong guildId, Permission p);
|
||||
IEnumerable<FollowedStream> GetAllFollowedStreams();
|
||||
void SetCleverbotEnabled(ulong id, bool cleverbotEnabled);
|
||||
|
@ -13,7 +13,7 @@ namespace NadekoBot.Services.Database.Repositories.Impl
|
||||
{
|
||||
}
|
||||
|
||||
public new IEnumerable<GuildConfig> GetAll() =>
|
||||
public IEnumerable<GuildConfig> GetAllGuildConfigs() =>
|
||||
_set.Include(gc => gc.LogSetting)
|
||||
.ThenInclude(ls => ls.IgnoredChannels)
|
||||
.Include(gc => gc.LogSetting)
|
||||
|
Loading…
Reference in New Issue
Block a user