diff options
author | TrueDoctor <d-kobert@web.de> | 2018-06-15 09:58:24 +0200 |
---|---|---|
committer | TrueDoctor <d-kobert@web.de> | 2018-06-15 09:58:24 +0200 |
commit | 380d9ec6048663b0e497e2437222d783236b864f (patch) | |
tree | 635fd93e6902c696abe31526da1fc15db7f2d516 /DiscoBot/Commands | |
parent | c00b3bbf39ae2756aecceaa54b3a87a0e3955a9e (diff) |
Added Properties Class
auto load last settings
removed sound enumerable
moved Sonds to properties
moved Commands to properties
Diffstat (limited to 'DiscoBot/Commands')
-rw-r--r-- | DiscoBot/Commands/Help.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/DiscoBot/Commands/Help.cs b/DiscoBot/Commands/Help.cs index 7b77e2b..bf58070 100644 --- a/DiscoBot/Commands/Help.cs +++ b/DiscoBot/Commands/Help.cs @@ -5,9 +5,11 @@ namespace DiscoBot.Commands using System; using System.Collections.Generic; using System.IO; + using System.Security.Cryptography; using System.Threading.Tasks; using DiscoBot.Auxiliary; + using DiscoBot.DSA_Game; using Discord.Commands; @@ -19,7 +21,7 @@ namespace DiscoBot.Commands { static Help() { - TextReader stream = new StreamReader(@"..\..\Help.json"); // Load command-description file + /*TextReader stream = new StreamReader(@"..\..\Help.json"); // Load command-description file var reader = new JsonTextReader(stream); // create stream reader reader.Read(); // step into structure, until the array starts @@ -35,23 +37,23 @@ namespace DiscoBot.Commands catch (Exception e) { // ignored - } + }*/ } - public static List<CommandInfo> Commands { get; } = new List<CommandInfo>(); + //public static List<CommandInfo> Commands { get; } = new List<CommandInfo>(); public static string Get_Specific_Help(string command) { // return command specific help - var com = Commands.OrderBy(x => SpellCorrect.CompareEasy(x.Name, command.ToLower())).First(); // get best fit command + var com = Dsa.Properties.CommandInfos.OrderBy(x => SpellCorrect.CompareEasy(x.Name, command.ToLower())).First(); // get best fit command return com.GetDescription(); } public static string Get_Generic_Help() { string res = ""; - foreach (var com in Commands) + foreach (var com in Dsa.Properties.CommandInfos) { int first_column_width = 8; res += ("!" + com.Name + ": ").AddSpaces(first_column_width) + com.Brief; |