newname command

This commit is contained in:
Kwoth
2016-01-11 19:36:15 +01:00
parent e765d6726b
commit 6c9518020f
3 changed files with 9 additions and 2 deletions

View File

@ -331,7 +331,14 @@ namespace NadekoBot.Modules
await e.Send("I cant do it :(");
}
});
cgb.CreateCommand(".newname")
.Description("Give the bot a new name.")
.Parameter("new_name",Discord.Commands.ParameterType.Required)
.Do(async e => {
if (e.User.Id != NadekoBot.OwnerID) return;
await client.CurrentUser.Edit(NadekoBot.password, e.GetArg("new_name"));
});
});
}