diff options
author | Kobert-P <kassiaK@yahoo.de> | 2018-06-07 23:05:19 +0200 |
---|---|---|
committer | Kobert-P <kassiaK@yahoo.de> | 2018-06-07 23:05:19 +0200 |
commit | ae507064b9b0dc29d72f02b1ff3d7560bd38a89f (patch) | |
tree | 6a355e0a3605ba624b8ba2a0d2f5aef42537de53 | |
parent | 4c43b2130321948d46d6e59d15068c57b5a07778 (diff) |
!help ich bin
-rw-r--r-- | DiscoBot/Commands/Gm.cs | 6 | ||||
-rw-r--r-- | DiscoBot/Commands/Help.cs | 11 | ||||
-rw-r--r-- | DiscoBot/Help.json | 15 |
3 files changed, 29 insertions, 3 deletions
diff --git a/DiscoBot/Commands/Gm.cs b/DiscoBot/Commands/Gm.cs index af152fa..212bc83 100644 --- a/DiscoBot/Commands/Gm.cs +++ b/DiscoBot/Commands/Gm.cs @@ -34,6 +34,12 @@ name = givenName.Aggregate((s, c) => s + c); } + if (name.ToLower().Equals("man") || name.ToLower().Equals("help")) + { + return this.ReplyAsync("```xl\n" + Help.Get_Specific_Help("ich bin") + "\n```"); + + } + var character = Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(name, x.Name)).First(); // usage of compareEasy diff --git a/DiscoBot/Commands/Help.cs b/DiscoBot/Commands/Help.cs index 96e7d46..7d35875 100644 --- a/DiscoBot/Commands/Help.cs +++ b/DiscoBot/Commands/Help.cs @@ -50,8 +50,13 @@ namespace DiscoBot.Commands [Command("help"), Summary("prints the help menu.")] [Alias("Help", "man", "Man")] - public async Task ShowHelpAsync(string command = "") + public async Task ShowHelpAsync(params string[] command_list) { + var command = ""; + if (command_list.Length > 0) { + command = command_list.Aggregate((s, c) => s + " " + c); + } + if (command.Equals(string.Empty)) // return generic Help { string res = ""; @@ -62,10 +67,10 @@ namespace DiscoBot.Commands if (com.Description.Length > 1) { - res += "\n\t(!man " + com.Name + " gibt genauere Informationen)"; + res += "\n\t(\"!man " + com.Name + "\" gibt genauere Informationen)"; } - res += "\n"; + res += "\n\n"; } //await this.ReplyAsync("```\n[hilfreiche Erklärungen]\nAuflistung aller Commands mit !list commands\n```"); await this.ReplyAsync("```xl\n" + res +"\n```"); diff --git a/DiscoBot/Help.json b/DiscoBot/Help.json index 0407deb..90f9fc0 100644 --- a/DiscoBot/Help.json +++ b/DiscoBot/Help.json @@ -1,6 +1,21 @@ { "CommandInfos": [ { + "Name": "ich bin", + "Scope": "All", + "Brief": "Setzt den gespielten Charakter fest", + "Description": [ + "Mit \"!Ich bin\" kann der gespielte Charakter definiert, bzw. gewechselt werden.\n", + " Die Charaktere müssen als *.xml Dateien hinterlegt sein.\n\n", + " !ich Zeigt an welcher Charakter zur Zeit gespielt wird\n", + " !ich bin Zalibius Wechsel zum Helden Zalibius\n", + " !ich Rhoktar Orkische Variante von !ich bin.\n", + " Wechselt zu Rhoktar.\n\n", + " !list chars Zeigt die Liste verfügbarer Charaktere.\n", + " \n" + ] + }, + { "Name": "List", "Scope": "All", "Brief": "Testbeschreibung", |