From 0eb869211c3bf73ce3c66f8e7c2390502afd7c88 Mon Sep 17 00:00:00 2001 From: RogueException Date: Wed, 13 Jul 2016 08:09:23 -0300 Subject: [PATCH] Fixed escapes for unparsed parameters --- src/Discord.Net.Commands/CommandParser.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Discord.Net.Commands/CommandParser.cs b/src/Discord.Net.Commands/CommandParser.cs index 262d3cb58..039d7e723 100644 --- a/src/Discord.Net.Commands/CommandParser.cs +++ b/src/Discord.Net.Commands/CommandParser.cs @@ -12,8 +12,7 @@ namespace Discord.Commands Parameter, QuotedParameter } - - //TODO: Check support for escaping + public static async Task ParseArgs(Command command, IMessage context, string input, int startPos) { CommandParameter curParam = null; @@ -43,7 +42,7 @@ namespace Discord.Commands } } //Are we escaping the next character? - if (c == '\\') + if (c == '\\' && (curParam == null || !curParam.IsUnparsed)) { isEscaping = true; continue;