diff options
author | Kobert-P <kassiaK@yahoo.de> | 2018-06-11 22:48:45 +0200 |
---|---|---|
committer | Kobert-P <kassiaK@yahoo.de> | 2018-06-11 22:48:45 +0200 |
commit | 8eeb66302a494853aee10c31f07752cb2c0b1655 (patch) | |
tree | 402c74b348692ebdcd5bf4f70b8bb56f7ecd2475 /DiscoBot/Commands/Help.cs | |
parent | 350ad6162844e55f0fb821c51dfeea4cc8569485 (diff) |
!list help
Diffstat (limited to 'DiscoBot/Commands/Help.cs')
-rw-r--r-- | DiscoBot/Commands/Help.cs | 34 |
1 files changed, 20 insertions, 14 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; |