summaryrefslogtreecommitdiff
path: root/DiscoBot
diff options
context:
space:
mode:
authorKobert-P <kassiaK@yahoo.de>2018-06-11 22:48:45 +0200
committerKobert-P <kassiaK@yahoo.de>2018-06-11 22:48:45 +0200
commit8eeb66302a494853aee10c31f07752cb2c0b1655 (patch)
tree402c74b348692ebdcd5bf4f70b8bb56f7ecd2475 /DiscoBot
parent350ad6162844e55f0fb821c51dfeea4cc8569485 (diff)
!list help
Diffstat (limited to 'DiscoBot')
-rw-r--r--DiscoBot/Commands/Help.cs34
-rw-r--r--DiscoBot/Commands/List.cs9
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(