From 4c43b2130321948d46d6e59d15068c57b5a07778 Mon Sep 17 00:00:00 2001 From: Kobert-P Date: Thu, 7 Jun 2018 20:31:22 +0200 Subject: Help.json now contains a brief description that is output for global !help --- DiscoBot/Commands/Help.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'DiscoBot/Commands/Help.cs') diff --git a/DiscoBot/Commands/Help.cs b/DiscoBot/Commands/Help.cs index 2bcbd03..96e7d46 100644 --- a/DiscoBot/Commands/Help.cs +++ b/DiscoBot/Commands/Help.cs @@ -54,7 +54,21 @@ namespace DiscoBot.Commands { if (command.Equals(string.Empty)) // return generic Help { - await this.ReplyAsync("```\n[hilfreiche Erklärungen]\nAuflistung aller Commands mit !list commands\n```"); + string res = ""; + + foreach (var com in Commands) + { + res += "!" + com.Name + ": " + com.Brief; + + if (com.Description.Length > 1) + { + res += "\n\t(!man " + com.Name + " gibt genauere Informationen)"; + } + + res += "\n"; + } + //await this.ReplyAsync("```\n[hilfreiche Erklärungen]\nAuflistung aller Commands mit !list commands\n```"); + await this.ReplyAsync("```xl\n" + res +"\n```"); return; } -- cgit v1.2.3-54-g00ecf