Reputation: 130
So, I'm trying to change the nickname on the bot to the username of the command sender (?) So here is what I got going now but it changes the name to the id of the user?
commands.CreateCommand("tts")
.Parameter("userMsg", ParameterType.Unparsed)
.Do(async (e) =>
{
var server = _client.GetServer(*server id*);
var user = server.GetUser(_client.CurrentUser.Id);
await user.Edit(nickname: e.User.Mention);
string UserMsg = e.GetArg("userMsg");
await e.Channel.SendTTSMessage(UserMsg);
});
}
What I got going now only changes the bots name to the userid but I don't want that? I've also tried to search around but can't really find anything?
Thanks in advance!
Upvotes: 2
Views: 2252