我正在尝试使用VB.Net
创建自己的discord bot并且我想添加命令更改bot name命令正在工作但名称更改不起作用,我不知道如何解决它。< / p>
我的尝试#1
Dim Client As Discord.IDiscordClient
Dim Guild As IGuild = Await Client.GetGuildAsync("256776363892015115")
Dim user = Guild.GetUserAsync(Discord.CurrentUser.Id)
Await user.Result.ModifyAsync(New GuildUserProperties With {
.Nickname = "Kissa"
})
我的尝试#2
Discord.GetGuild("256776363892015115").GetUser(Discord.CurrentUser.Id).ModifyAsync(New GuildUserProperties With {
.Nickname = "asd"
})
关于代码的图片:
答案 0 :(得分:0)
这样做:
版本0.9:
var user = Discord.GetGuild("256776363892015115").GetUser(Discord.CurrentUser.Id);
await user.Edit(nickname: "MySuperBot");
版本1.x
var guild = discordClient.GetGuild(256776363892015115);
var user = guild.GetUser(discordClient.CurrentUser.Id);
await user.ModifyAsync(x => {
x.Nickname = "MySuperBot";
});
答案 1 :(得分:0)
discord.GetGuild("256776363892015115").GetUser(discord.CurrentUser.Id).ModifyAsync(Function(x)
x.Nickname = "MySuperBot"
End Function)