Adding Nicknaming on Link
This commit is contained in:
parent
44df5790c6
commit
96561089c2
@ -198,7 +198,7 @@ namespace ChaosBot.Discord.Modules.User
|
|||||||
lsChar.DiscordGuildId = Context.Guild.Id;
|
lsChar.DiscordGuildId = Context.Guild.Id;
|
||||||
lsChar.Name = character.Character.Name;
|
lsChar.Name = character.Character.Name;
|
||||||
lsChar.Avatar = character.Character.Avatar;
|
lsChar.Avatar = character.Character.Avatar;
|
||||||
|
|
||||||
await dbContext.LodestoneCharacter.Upsert(lsChar)
|
await dbContext.LodestoneCharacter.Upsert(lsChar)
|
||||||
.On(x => new {x.DiscordGuildId, x.LodestoneId}).RunAsync();
|
.On(x => new {x.DiscordGuildId, x.LodestoneId}).RunAsync();
|
||||||
}
|
}
|
||||||
@ -207,6 +207,10 @@ namespace ChaosBot.Discord.Modules.User
|
|||||||
sb.AppendLine(
|
sb.AppendLine(
|
||||||
$"{Context.User.Mention} has been successfully linked to {character.Character.Name}");
|
$"{Context.User.Mention} has been successfully linked to {character.Character.Name}");
|
||||||
embed.Description = sb.ToString();
|
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());
|
await ReplyAsync(null, false, embed.Build());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user