fixed .antispamignore, again

This commit is contained in:
Toastie 2025-03-24 13:10:06 +13:00
parent 7246c982df
commit a583c7d763
Signed by: toastie_t0ast
GPG key ID: 0861BE54AD481DC7
2 changed files with 11 additions and 4 deletions
CHANGELOG.md
src/EllieBot/Modules/Administration/Protection

View file

@ -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

View file

@ -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()
};
}