From efa1dbb9db2770a884ad12fc78ac617511a7c314 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Thu, 28 Jan 2016 13:20:14 +0100 Subject: [PATCH] reason was not working, removed it for now --- NadekoBot/Modules/Administration.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/NadekoBot/Modules/Administration.cs b/NadekoBot/Modules/Administration.cs index 17ed3144..436b6dd5 100644 --- a/NadekoBot/Modules/Administration.cs +++ b/NadekoBot/Modules/Administration.cs @@ -259,7 +259,7 @@ namespace NadekoBot.Modules .Parameter("user", ParameterType.Optional) .Do(async e => { var usr = e.User; - if(e.GetArg("user") != null) e.Channel.FindUsers(e.GetArg("user")).FirstOrDefault(); + if(e.GetArg("user") != null) usr = e.Channel.FindUsers(e.GetArg("user")).FirstOrDefault(); await e.Send($"Id of the user { usr.Name } is { usr.Id }"); }); @@ -310,7 +310,6 @@ namespace NadekoBot.Modules cgb.CreateCommand(".die") .Alias(".graceful") - .Parameter("reason",ParameterType.Unparsed) .Description("Works only for the owner. Shuts the bot down and notifies users about the restart.") .Do(async e => { if (e.User.Id == NadekoBot.OwnerID) { @@ -318,13 +317,6 @@ namespace NadekoBot.Modules t.Interval = 2000; t.Elapsed += (s, ev) => { Environment.Exit(0); }; t.Start(); - string reason = e.GetArg("reason"); - if (reason == null) - reason = "Unspecified."; - foreach (var kvp in Music.musicPlayers) { - if(kvp.Value?.CurrentSong?.Channel!=null) - await kvp.Value.CurrentSong.Channel.Send($"Owner initiated a shutdown, sorry for the interruption.\nReason: `{reason}`"); - } await e.Send("`Shutting down.`"); } });