diff --git a/SecondBotEvents/Services/CommandsService.cs b/SecondBotEvents/Services/CommandsService.cs index b2c1798..65ca489 100644 --- a/SecondBotEvents/Services/CommandsService.cs +++ b/SecondBotEvents/Services/CommandsService.cs @@ -344,13 +344,13 @@ namespace SecondBotEvents.Services } try { + string lowerName = C.command.ToLower(); - if(commandnameLowerToReal.ContainsKey(lowerName) == false) + if(commandnameLowerToReal.ContainsKey(lowerName) == true) { - return new KeyValuePair(false, "Unknown command"); + C.command = commandnameLowerToReal[lowerName]; } - C.command = commandnameLowerToReal[lowerName]; - if(master.CustomCommandsService.HasCommand(C.command) == true) + else if(master.CustomCommandsService.HasCommand(C.command) == true) { if(inCustomCommand == true) { @@ -358,6 +358,11 @@ namespace SecondBotEvents.Services } return master.CustomCommandsService.RunCommand(C, source); } + else + { + return new KeyValuePair(false, "Unknown command"); + } + KeyValuePair reply = RunBaseCommand(C, source); if (C.replyTarget != null) {