From 6c9518020f16570f0c717db7bce42dde606d4729 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 11 Jan 2016 19:36:15 +0100 Subject: [PATCH] newname command --- NadekoBot/Modules/Administration.cs | 7 +++++++ NadekoBot/NadekoBot.csproj | 2 +- NadekoBot/packages.config | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NadekoBot/Modules/Administration.cs b/NadekoBot/Modules/Administration.cs index 6c18e0ca..e39a46e0 100644 --- a/NadekoBot/Modules/Administration.cs +++ b/NadekoBot/Modules/Administration.cs @@ -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")); + }); }); } diff --git a/NadekoBot/NadekoBot.csproj b/NadekoBot/NadekoBot.csproj index 39f7dcaf..1e3525f3 100644 --- a/NadekoBot/NadekoBot.csproj +++ b/NadekoBot/NadekoBot.csproj @@ -69,7 +69,7 @@ True - ..\packages\Newtonsoft.Json.8.0.1-beta3\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll True diff --git a/NadekoBot/packages.config b/NadekoBot/packages.config index edde9f6f..3ba870e9 100644 --- a/NadekoBot/packages.config +++ b/NadekoBot/packages.config @@ -1,6 +1,6 @@  - +