$waifuinfo will update target user's username and discrimnator in case they changed
This commit is contained in:
parent
871237af4e
commit
7e79dd4163
@ -403,6 +403,7 @@ namespace NadekoBot.Modules.Gambling
|
|||||||
x.UpdateType == WaifuUpdateType.Claimed &&
|
x.UpdateType == WaifuUpdateType.Claimed &&
|
||||||
x.New == null);
|
x.New == null);
|
||||||
if (w == null)
|
if (w == null)
|
||||||
|
{
|
||||||
uow.Waifus.Add(w = new WaifuInfo()
|
uow.Waifus.Add(w = new WaifuInfo()
|
||||||
{
|
{
|
||||||
Affinity = null,
|
Affinity = null,
|
||||||
@ -410,6 +411,10 @@ namespace NadekoBot.Modules.Gambling
|
|||||||
Price = 1,
|
Price = 1,
|
||||||
Waifu = uow.DiscordUsers.GetOrCreate(target),
|
Waifu = uow.DiscordUsers.GetOrCreate(target),
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
w.Waifu.Username = target.Username;
|
||||||
|
w.Waifu.Discriminator = target.Discriminator;
|
||||||
await uow.CompleteAsync().ConfigureAwait(false);
|
await uow.CompleteAsync().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user