diff options
-rw-r--r-- | DiscoBot/Commands/Help.cs | 34 | ||||
-rw-r--r-- | DiscoBot/Commands/List.cs | 9 |
2 files changed, 28 insertions, 15 deletions
diff --git a/DiscoBot/Commands/Help.cs b/DiscoBot/Commands/Help.cs index c6de4a9..7b77e2b 100644 --- a/DiscoBot/Commands/Help.cs +++ b/DiscoBot/Commands/Help.cs @@ -48,8 +48,26 @@ namespace DiscoBot.Commands return com.GetDescription(); } + public static string Get_Generic_Help() + { + string res = ""; + foreach (var com in Commands) + { + int first_column_width = 8; + res += ("!" + com.Name + ": ").AddSpaces(first_column_width) + com.Brief; + + if (com.Description.Length > 1) + { + res += "\n" + "".AddSpaces(first_column_width) + "(\"!man " + com.Name + "\" gibt genauere Informationen)"; + } + + res += "\n\n"; + } + return res; + } + [Command("help"), Summary("prints the help menu.")] - [Alias("Help", "man", "Man")] + [Alias("Help", "man", "Man", "Hilfe", "hilfe", "h")] public async Task ShowHelpAsync(params string[] command_list) { var command = ""; @@ -59,20 +77,8 @@ namespace DiscoBot.Commands if (command.Equals(string.Empty)) // return generic Help { - string res = ""; - - foreach (var com in Commands) - { - int first_column_width = 8; - res += ("!" + com.Name + ": ").AddSpaces(first_column_width) + com.Brief; - - if (com.Description.Length > 1) - { - res += "\n" + "".AddSpaces(first_column_width) + "(\"!man " + com.Name + "\" gibt genauere Informationen)"; - } + string res = Get_Generic_Help(); - res += "\n\n"; - } //await this.ReplyAsync("```\n[hilfreiche Erklärungen]\nAuflistung aller Commands mit !list commands\n```"); await this.ReplyAsync("```xl\n" + res +"\n```"); return; diff --git a/DiscoBot/Commands/List.cs b/DiscoBot/Commands/List.cs index 2153578..e87c675 100644 --- a/DiscoBot/Commands/List.cs +++ b/DiscoBot/Commands/List.cs @@ -28,6 +28,11 @@ switch (prop.ToLower()) { + case "man": + case "help": + await this.ReplyAsync("```xl\n" + Help.Get_Specific_Help("List") + "\n```"); + return; + // break; case "all": case "held": case "char": @@ -72,7 +77,8 @@ res.AddRange(Dsa.Chars.Select(x => x.Name)); break; case "commands": - res.AddRange(Help.Commands.Select(x => x.Name)); + // res.AddRange(Help.Commands.Select(x => x.Name)); + res.Add(Help.Get_Generic_Help()); break; case "e": case "eig": @@ -125,6 +131,7 @@ res.AddRange( character.Talente.Select(s => s.Name)); break; + case "play": case "sound": case "sounds": res.AddRange( |