Adding Nicknaming on Link

This commit is contained in:
Sean "Solao Bajiuik" Stoves 2020-08-10 00:04:15 -04:00
parent 44df5790c6
commit 96561089c2

View File

@ -198,7 +198,7 @@ namespace ChaosBot.Discord.Modules.User
lsChar.DiscordGuildId = Context.Guild.Id;
lsChar.Name = character.Character.Name;
lsChar.Avatar = character.Character.Avatar;
await dbContext.LodestoneCharacter.Upsert(lsChar)
.On(x => new {x.DiscordGuildId, x.LodestoneId}).RunAsync();
}
@ -207,6 +207,10 @@ namespace ChaosBot.Discord.Modules.User
sb.AppendLine(
$"{Context.User.Mention} has been successfully linked to {character.Character.Name}");
embed.Description = sb.ToString();
IGuildUser nUser = await Context.Guild.GetUserAsync(Context.User.Id);
await nUser.ModifyAsync(x => { x.Nickname = character.Character.Name; });
await ReplyAsync(null, false, embed.Build());
}
else