- Ignored intent warnings on startup

- Moved FilterWordsChannelId to a separate table (needs testing)
- Some todos updated
This commit is contained in:
Kwoth
2022-01-10 14:18:34 +01:00
parent c58ae9fc13
commit b044eb2d9a
9 changed files with 2976 additions and 128 deletions

View File

@@ -175,13 +175,13 @@ public partial class Permissions
{
var channel = (ITextChannel)ctx.Channel;
FilterChannelId removed;
FilterWordsChannelId removed;
await using (var uow = _db.GetDbContext())
{
var config =
uow.GuildConfigsForId(channel.Guild.Id, set => set.Include(gc => gc.FilterWordsChannelIds));
var match = new FilterChannelId { ChannelId = channel.Id };
var match = new FilterWordsChannelId { ChannelId = channel.Id };
removed = config.FilterWordsChannelIds.FirstOrDefault(fc => fc.Equals(match));
if (removed is null)
config.FilterWordsChannelIds.Add(match);