Merge branch 'dev' into b2
This commit is contained in:
commit
fc4ee94c3a
@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Games
|
|||||||
{
|
{
|
||||||
var bot = ChatterBotFactory.Create(ChatterBotType.CLEVERBOT);
|
var bot = ChatterBotFactory.Create(ChatterBotType.CLEVERBOT);
|
||||||
CleverbotGuilds = new ConcurrentDictionary<ulong, ChatterBotSession>(
|
CleverbotGuilds = new ConcurrentDictionary<ulong, ChatterBotSession>(
|
||||||
uow.GuildConfigs.GetAll()
|
NadekoBot.AllGuildConfigs
|
||||||
.Where(gc => gc.CleverbotEnabled)
|
.Where(gc => gc.CleverbotEnabled)
|
||||||
.ToDictionary(gc => gc.GuildId, gc => bot.CreateSession()));
|
.ToDictionary(gc => gc.GuildId, gc => bot.CreateSession()));
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ namespace NadekoBot
|
|||||||
|
|
||||||
using (var uow = DbHandler.UnitOfWork())
|
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 For(ulong guildId, Func<DbSet<GuildConfig>, IQueryable<GuildConfig>> includes = null);
|
||||||
GuildConfig PermissionsFor(ulong guildId);
|
GuildConfig PermissionsFor(ulong guildId);
|
||||||
IEnumerable<GuildConfig> PermissionsForAll();
|
IEnumerable<GuildConfig> PermissionsForAll();
|
||||||
|
IEnumerable<GuildConfig> GetAllGuildConfigs();
|
||||||
GuildConfig SetNewRootPermission(ulong guildId, Permission p);
|
GuildConfig SetNewRootPermission(ulong guildId, Permission p);
|
||||||
IEnumerable<FollowedStream> GetAllFollowedStreams();
|
IEnumerable<FollowedStream> GetAllFollowedStreams();
|
||||||
void SetCleverbotEnabled(ulong id, bool cleverbotEnabled);
|
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)
|
_set.Include(gc => gc.LogSetting)
|
||||||
.ThenInclude(ls => ls.IgnoredChannels)
|
.ThenInclude(ls => ls.IgnoredChannels)
|
||||||
.Include(gc => gc.LogSetting)
|
.Include(gc => gc.LogSetting)
|
||||||
|
Loading…
Reference in New Issue
Block a user