Clash of clans saving commented out for now
This commit is contained in:
parent
6c734afa69
commit
5243bf18aa
@ -21,23 +21,23 @@ namespace NadekoBot.Modules.ClashOfClans
|
|||||||
|
|
||||||
static ClashOfClans()
|
static ClashOfClans()
|
||||||
{
|
{
|
||||||
using (var uow = DbHandler.UnitOfWork())
|
//using (var uow = DbHandler.UnitOfWork())
|
||||||
{
|
//{
|
||||||
ClashWars = new ConcurrentDictionary<ulong, List<ClashWar>>(
|
// ClashWars = new ConcurrentDictionary<ulong, List<ClashWar>>(
|
||||||
uow.ClashOfClans
|
// uow.ClashOfClans
|
||||||
.GetAllWars()
|
// .GetAllWars()
|
||||||
.Select(cw => {
|
// .Select(cw => {
|
||||||
if (cw == null || cw.Bases == null)
|
// if (cw == null || cw.Bases == null)
|
||||||
return null;
|
// return null;
|
||||||
cw.Channel = NadekoBot.Client.GetGuild(cw.GuildId)
|
// cw.Channel = NadekoBot.Client.GetGuild(cw.GuildId)
|
||||||
?.GetTextChannel(cw.ChannelId);
|
// ?.GetTextChannel(cw.ChannelId);
|
||||||
cw.Bases.Capacity = cw.Size;
|
// cw.Bases.Capacity = cw.Size;
|
||||||
return cw;
|
// return cw;
|
||||||
})
|
// })
|
||||||
.Where(cw => cw?.Channel != null)
|
// .Where(cw => cw?.Channel != null)
|
||||||
.GroupBy(cw => cw.GuildId)
|
// .GroupBy(cw => cw.GuildId)
|
||||||
.ToDictionary(g => g.Key, g => g.ToList()));
|
// .ToDictionary(g => g.Key, g => g.ToList()));
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
public ClashOfClans(ILocalization loc, CommandService cmds, ShardedDiscordClient client) : base(loc, cmds, client)
|
public ClashOfClans(ILocalization loc, CommandService cmds, ShardedDiscordClient client) : base(loc, cmds, client)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user