diff --git a/TGServerService/ChatCommands.cs b/TGServerService/ChatCommands.cs index 3ea26883d3..f0a8d42ec6 100644 --- a/TGServerService/ChatCommands.cs +++ b/TGServerService/ChatCommands.cs @@ -40,11 +40,12 @@ namespace TGServerService class ServerChatCommand : ChatCommand { readonly string HelpText; - public ServerChatCommand(string name, string helpText, bool adminOnly) + public ServerChatCommand(string name, string helpText, bool adminOnly, int requiredParameters) { Keyword = name; RequiresAdmin = adminOnly; HelpText = helpText; + RequiredParameters = requiredParameters; } public override string GetHelpText() diff --git a/TGServerService/Interop.cs b/TGServerService/Interop.cs index 072d6aebda..48b2d7953a 100644 --- a/TGServerService/Interop.cs +++ b/TGServerService/Interop.cs @@ -44,7 +44,7 @@ namespace TGServerService try { foreach(var I in new JavaScriptSerializer().Deserialize>>(json)) - tmp.Add(new ServerChatCommand(I.Key, (string)I.Value["help_text"], (bool)I.Value["adminOnly"])); + tmp.Add(new ServerChatCommand(I.Key, (string)I.Value["help_text"], (bool)I.Value["adminOnly"], (int)I.Value["required_parameters"])); ServerChatCommands = tmp; } catch { }