Discord.Net设置机器人的昵称

时间:2017-03-24 10:15:13

标签: c# discord discord.net

标题说明了一切,我想设置我的Discord机器人的昵称。我试过谷歌,但我找不到任何东西。

1 个答案:

答案 0 :(得分:2)

0.9:

var server = discordClient.GetServer(01234567689);
var user = server.GetUser(discordClient.CurrentUser.Id);
await user.Edit(nickname: "The bots new nickname");

1.0:

var guild = discordClient.GetGuild(0123456789);
var user = guild.GetUser(discordClient.CurrentUser.Id);
await user.ModifyAsync(x => {
    x.Nickname = "The bots new nickname";
});