diff --git a/src/EllieBot/Db/Models/anti/AntiAltSetting.cs b/src/EllieBot/Db/Models/anti/AntiAltSetting.cs index a54e495..1a5f051 100644 --- a/src/EllieBot/Db/Models/anti/AntiAltSetting.cs +++ b/src/EllieBot/Db/Models/anti/AntiAltSetting.cs @@ -16,7 +16,6 @@ public class AntiAltSetting public ulong GuildId { get; set; } - [LinqToDB.Mapping.DataType(DataType.Interval)] public TimeSpan MinAge { get; set; } public PunishmentAction Action { get; set; } public int ActionDurationMinutes { get; set; } diff --git a/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs b/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs index 6f0f669..938ca9a 100644 --- a/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs +++ b/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs @@ -502,10 +502,10 @@ public class ProtectionService : IReadyExecutor, IEService { await using var uow = _db.GetDbContext(); - var configs = await uow.GetTable<AntiAltSetting>() - .AsNoTracking() - .Where(x => Queries.GuildOnShard(x.GuildId, _shardData.TotalShards, _shardData.ShardId)) - .ToListAsyncLinqToDB(); + var gids = _client.GetGuildIds(); + var configs = await uow.Set<AntiAltSetting>() + .Where(x => gids.Contains(x.GuildId)) + .ToListAsyncEF(); foreach (var config in configs) _antiAltGuilds[config.GuildId] = new(config); diff --git a/src/EllieBot/Modules/Xp/XpService.cs b/src/EllieBot/Modules/Xp/XpService.cs index 431f92c..b1ba3d2 100644 --- a/src/EllieBot/Modules/Xp/XpService.cs +++ b/src/EllieBot/Modules/Xp/XpService.cs @@ -227,11 +227,6 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand var oldStats = new LevelStats(u.Xp - data.Xp); var newStats = new LevelStats(u.Xp); - Log.Information("User {User} xp updated from {OldLevel} to {NewLevel}", - u.UserId, - oldStats.TotalXp, - newStats.TotalXp); - if (oldStats.Level < newStats.Level) { await _levelUpQueue.EnqueueAsync(NotifyUser(u.GuildId,