diff --git a/src/EllieBot/Modules/Permissions/Filter/FilterService.cs b/src/EllieBot/Modules/Permissions/Filter/FilterService.cs index 637fba1..b7ef2a5 100644 --- a/src/EllieBot/Modules/Permissions/Filter/FilterService.cs +++ b/src/EllieBot/Modules/Permissions/Filter/FilterService.cs @@ -9,17 +9,17 @@ namespace EllieBot.Modules.Permissions.Services; public sealed class FilterService : IExecOnMessage, IReadyExecutor { - public ConcurrentHashSet<ulong> InviteFilteringChannels { get; } - public ConcurrentHashSet<ulong> InviteFilteringServers { get; } + public ConcurrentHashSet<ulong> InviteFilteringChannels { get; } = []; + public ConcurrentHashSet<ulong> InviteFilteringServers { get; } = []; //serverid, filteredwords - public ConcurrentDictionary<ulong, ConcurrentHashSet<string>> ServerFilteredWords { get; } + public ConcurrentDictionary<ulong, ConcurrentHashSet<string>> ServerFilteredWords { get; } = new(); - public ConcurrentHashSet<ulong> WordFilteringChannels { get; } - public ConcurrentHashSet<ulong> WordFilteringServers { get; } + public ConcurrentHashSet<ulong> WordFilteringChannels { get; } = []; + public ConcurrentHashSet<ulong> WordFilteringServers { get; } = []; - public ConcurrentHashSet<ulong> LinkFilteringChannels { get; } - public ConcurrentHashSet<ulong> LinkFilteringServers { get; } + public ConcurrentHashSet<ulong> LinkFilteringChannels { get; } = []; + public ConcurrentHashSet<ulong> LinkFilteringServers { get; } = []; public int Priority => int.MaxValue - 1; @@ -32,15 +32,6 @@ public sealed class FilterService : IExecOnMessage, IReadyExecutor _db = db; _shardData = shardData; - using (var uow = db.GetDbContext()) - { - var ids = client.GetGuildIds(); - var configs = uow.Set<GuildConfig>() - .AsQueryable() - .Where(gc => ids.Contains(gc.GuildId)) - .ToList(); - } - client.MessageUpdated += (oldData, newMsg, channel) => { _ = Task.Run(() =>