From a583c7d763efdb335a665e2f85021be44576a053 Mon Sep 17 00:00:00 2001 From: Toastie <toastie@toastiet0ast.com> Date: Mon, 24 Mar 2025 13:10:06 +1300 Subject: [PATCH] fixed .antispamignore, again --- CHANGELOG.md | 5 +++++ .../Administration/Protection/ProtectionService.cs | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 490f462..0ee62e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ *a,c,f,r,o* +## [6.0.14] - 24.03.2025 + +### Fixed +- Fixed `.antispamignore` restart persistence + ## [6.0.13] - 23.03.2025 ### Added diff --git a/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs b/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs index f850006..039dad8 100644 --- a/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs +++ b/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs @@ -391,7 +391,7 @@ public class ProtectionService : IReadyExecutor, IEService { var obj = new AntiSpamIgnore { - ChannelId = channelId + ChannelId = channelId, }; await using var uow = _db.GetDbContext(); @@ -529,16 +529,18 @@ public class ProtectionService : IReadyExecutor, IEService }; } - var spamConfigs = await uow.GetTable<AntiSpamSetting>() + var spamConfigs = await uow.Set<AntiSpamSetting>() .AsNoTracking() - .Where(x => Queries.GuildOnShard(x.GuildId, _shardData.TotalShards, _shardData.ShardId)) - .ToListAsyncLinqToDB(); + .Where(x => gids.Contains(x.GuildId)) + .Include(x => x.IgnoredChannels) + .ToListAsyncEF(); foreach (var config in spamConfigs) { _antiSpamGuilds[config.GuildId] = new() { AntiSpamSettings = config, + UserStats = new() }; }