summaryrefslogtreecommitdiff
path: root/DiscoBot
diff options
context:
space:
mode:
authorKobert-P <kassiaK@yahoo.de>2018-06-07 12:03:38 +0200
committerKobert-P <kassiaK@yahoo.de>2018-06-07 12:03:38 +0200
commita14f901b0b53ddbdd04468a6186d47a9554efb9b (patch)
tree5e6f3bf091363aa5540bf0cd9be590faa80e5235 /DiscoBot
parent5b87516befe2e4fd0d2f4b372747836d2abf0c8c (diff)
Removed Man.cs
Diffstat (limited to 'DiscoBot')
-rw-r--r--DiscoBot/Commands/Help.cs13
-rw-r--r--DiscoBot/Commands/LebenUndAstral.cs10
-rw-r--r--DiscoBot/Commands/Man.cs42
-rw-r--r--DiscoBot/DiscoBot.csproj1
4 files changed, 15 insertions, 51 deletions
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<CommandInfo> Commands { get; } = new List<CommandInfo>();
+
+ 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 @@
<Compile Include="Audio\AudioService.cs" />
<Compile Include="Auxiliary\CommandInfo.cs" />
<Compile Include="Commands\Help.cs" />
- <Compile Include="Commands\Man.cs" />
<Compile Include="Auxiliary\Dice.cs" />
<Compile Include="Auxiliary\TalentEnumerableExtension.cs" />
<Compile Include="Commands\LebenUndAstral.cs" />