mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 02:08:27 -04:00
Lots more stuff
This commit is contained in:
12
src/Nadeko.Bot.Common/Extensions/DbExtensions.cs
Normal file
12
src/Nadeko.Bot.Common/Extensions/DbExtensions.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using NadekoBot.Db;
|
||||
using NadekoBot.Db.Models;
|
||||
// todo fix these namespaces. It should only be Nadeko.Bot.Db
|
||||
using NadekoBot.Services.Database;
|
||||
|
||||
namespace NadekoBot.Extensions;
|
||||
|
||||
public static class DbExtensions
|
||||
{
|
||||
public static DiscordUser GetOrCreateUser(this NadekoContext ctx, IUser original, Func<IQueryable<DiscordUser>, IQueryable<DiscordUser>> includes = null)
|
||||
=> ctx.GetOrCreateUser(original.Id, original.Username, original.Discriminator, original.AvatarId, includes);
|
||||
}
|
Reference in New Issue
Block a user