Split dangerous commands into cleanup commands for each module they belong to

This commit is contained in:
Kwoth
2023-07-15 13:39:46 +00:00
parent 842a8a2f71
commit 8f62a46016
91 changed files with 616 additions and 501 deletions

View File

@@ -1,4 +1,5 @@
using NadekoBot.Db;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Db;
using NadekoBot.Db.Models;
// todo fix these namespaces. It should only be Nadeko.Bot.Db
using NadekoBot.Services.Database;
@@ -7,6 +8,6 @@ namespace NadekoBot.Extensions;
public static class DbExtensions
{
public static DiscordUser GetOrCreateUser(this NadekoBaseContext ctx, IUser original, Func<IQueryable<DiscordUser>, IQueryable<DiscordUser>>? includes = null)
public static DiscordUser GetOrCreateUser(this DbContext ctx, IUser original, Func<IQueryable<DiscordUser>, IQueryable<DiscordUser>>? includes = null)
=> ctx.GetOrCreateUser(original.Id, original.Username, original.Discriminator, original.AvatarId, includes);
}