From 48562986919bd07095f783103b4f6ff1bb3af189 Mon Sep 17 00:00:00 2001 From: Madpeterz <57852827+Madpeterz@users.noreply.github.com> Date: Tue, 9 Feb 2021 18:59:19 +0000 Subject: [PATCH] Update API_interface.cs --- BSBshared/API/API_interface.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/BSBshared/API/API_interface.cs b/BSBshared/API/API_interface.cs index a321a89..5f91049 100644 --- a/BSBshared/API/API_interface.cs +++ b/BSBshared/API/API_interface.cs @@ -9,7 +9,9 @@ namespace BetterSecondBotShared.API { public abstract class API_interface { - public string CommandName { get { return GetType().Name.ToLowerInvariant(); } } + public string CommandName { get { return GetType().Name; } } + + public string CommandNameLower { get { return GetType().Name.ToLowerInvariant(); } } public virtual int Min_Required_args { get { return 0; } } public virtual string Helpfile { get { return "No help given"; } } public virtual string[] ArgTypes { get { return new string[] { }; } } @@ -45,7 +47,7 @@ namespace BetterSecondBotShared.API API_interface D = (API_interface)Activator.CreateInstance(com); if (D != null) { - if (subtype_map.ContainsKey(D.CommandName) == false) + if (subtype_map.ContainsKey(D.CommandNameLower) == false) { string worknamespace = com.Namespace; worknamespace = worknamespace.Replace("BSB.Commands.", ""); @@ -55,8 +57,8 @@ namespace BetterSecondBotShared.API worknamespace = worknamespace.Replace("BetterSecondBot.HttpServer.Control.", ""); worknamespace = worknamespace.Replace("BetterSecondBot.HttpServer.control.", ""); worknamespace = worknamespace.Replace("CMD_", ""); - subtype_map.Add(D.CommandName, D.GetType()); - subtype_workspace_map.Add(D.CommandName, worknamespace); + subtype_map.Add(D.CommandNameLower, D.GetType()); + subtype_workspace_map.Add(D.CommandNameLower, worknamespace); } else {