From a14f901b0b53ddbdd04468a6186d47a9554efb9b Mon Sep 17 00:00:00 2001 From: Kobert-P Date: Thu, 7 Jun 2018 12:03:38 +0200 Subject: Removed Man.cs --- DiscoBot/Commands/Help.cs | 13 ++++++++++-- DiscoBot/Commands/LebenUndAstral.cs | 10 ++++----- DiscoBot/Commands/Man.cs | 42 ------------------------------------- DiscoBot/DiscoBot.csproj | 1 - 4 files changed, 15 insertions(+), 51 deletions(-) delete mode 100644 DiscoBot/Commands/Man.cs (limited to 'DiscoBot') diff --git a/DiscoBot/Commands/Help.cs b/DiscoBot/Commands/Help.cs index d6c0e68..2bcbd03 100644 --- a/DiscoBot/Commands/Help.cs +++ b/DiscoBot/Commands/Help.cs @@ -40,6 +40,14 @@ namespace DiscoBot.Commands public static List Commands { get; } = new List(); + + public static string Get_Specific_Help(string command) + { + // return command specific help + var com = Commands.OrderBy(x => SpellCorrect.CompareEasy(x.Name, command.ToLower())).First(); // get best fit command + return com.GetDescription(); + } + [Command("help"), Summary("prints the help menu.")] [Alias("Help", "man", "Man")] public async Task ShowHelpAsync(string command = "") @@ -53,9 +61,10 @@ namespace DiscoBot.Commands // return command specific help - var com = Commands.OrderBy(x => SpellCorrect.CompareEasy(x.Name, command.ToLower())).First(); // get best fit command + //var com = Commands.OrderBy(x => SpellCorrect.CompareEasy(x.Name, command.ToLower())).First(); // get best fit command - await this.ReplyAsync("```xl\n" + com.GetDescription() + "\n```"); + //await this.ReplyAsync("```xl\n" + com.GetDescription() + "\n```"); + await this.ReplyAsync("```xl\n" + Get_Specific_Help(command) + "\n```"); } } } diff --git a/DiscoBot/Commands/LebenUndAstral.cs b/DiscoBot/Commands/LebenUndAstral.cs index 3796475..9022bef 100644 --- a/DiscoBot/Commands/LebenUndAstral.cs +++ b/DiscoBot/Commands/LebenUndAstral.cs @@ -81,9 +81,10 @@ if(prop.ToLower().Equals("help") || prop.ToLower().Equals("man")) { + + await this.ReplyAsync("```xl\n" + Help.Get_Specific_Help("LE") + "\n```"); + - Man man = new Man(); - await this.ReplyAsync("```xl\n" + man.Man_LE() + "\n```"); return; @@ -187,11 +188,8 @@ public class AE : ModuleBase if (prop.ToLower().Equals("help") || prop.ToLower().Equals("man")) { - - Man man = new Man(); - await this.ReplyAsync("```xl\n" + man.Man_AE() + "\n```"); + await this.ReplyAsync("```xl\n" + Help.Get_Specific_Help("AE") + "\n```"); return; - } //Incase the input is badly formated diff --git a/DiscoBot/Commands/Man.cs b/DiscoBot/Commands/Man.cs deleted file mode 100644 index 53838de..0000000 --- a/DiscoBot/Commands/Man.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace DiscoBot.Commands -{ - using Discord.Commands; - - public class Man : ModuleBase - //public class Man : ModuleBase - { - - //Help for !LE command - public string Man_LE() - //public async Task Man_AE() - { - string res = ""; - res += "Use !LE to display, set, or change LE value\n\n"; - res += " !LE Display values\n"; - res += " !LE 30 Set LE to 30\n"; - res += " !LE +5 Increment LE by 5 (up to the maximum)\n"; - res += " !LE ++5 Increment LE by 5 (ignoring the maximum)\n"; - res += " !LE -5 Decrease LE by 5\n"; - res += " \n"; - - return res; - //await this.ReplyAsync("```xl\n" + res + "\n```"); - } - - //Help for !AE command - public string Man_AE() - { - string res = ""; - res += "Use !AE (or !Asp) to display, set, or change AE/Asp value\n\n"; - res += " !AE Display values\n"; - res += " !AE 30 Set Asp to 30\n"; - res += " !AE +5 Increment Asp by 5 (up to the maximum)\n"; - res += " !AE ++5 Increment Asp by 5 (ignoring the maximum)\n"; - res += " !AE -5 Decrease Asp by 5 (down to 0)\n"; - res += " \n"; - - return res; - } - -} -} diff --git a/DiscoBot/DiscoBot.csproj b/DiscoBot/DiscoBot.csproj index 9e8b193..8978e30 100644 --- a/DiscoBot/DiscoBot.csproj +++ b/DiscoBot/DiscoBot.csproj @@ -151,7 +151,6 @@ - -- cgit v1.2.3-54-g00ecf