From 079d9d487d868c2f4cdc1bf724b277161faa6a4b Mon Sep 17 00:00:00 2001 From: RogueException Date: Tue, 12 Jul 2016 07:39:27 -0300 Subject: [PATCH] Forwarded the parse error if a command search has only one match --- src/Discord.Net.Commands/CommandService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.Commands/CommandService.cs b/src/Discord.Net.Commands/CommandService.cs index a3400a465..fd826f060 100644 --- a/src/Discord.Net.Commands/CommandService.cs +++ b/src/Discord.Net.Commands/CommandService.cs @@ -249,7 +249,12 @@ namespace Discord.Commands { var parseResult = await commands[i].Parse(message, searchResult); if (!parseResult.IsSuccess) - continue; + { + if (commands.Count == 1) + return parseResult; + else + continue; + } var executeResult = await commands[i].Execute(message, parseResult); return executeResult; }