浏览代码

fix: ignore escape behavior on remainder parameters (#994)

Co-authored-by: Quahu <quahu@gmail.com>
tags/2.1.1
Christopher Felegy 7 年前
父节点
当前提交
2e95c4913b
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. +7
    -7
      src/Discord.Net.Commands/CommandParser.cs

+ 7
- 7
src/Discord.Net.Commands/CommandParser.cs 查看文件

@@ -53,6 +53,13 @@ namespace Discord.Commands
else
c = '\0';

//If we're processing an remainder parameter, ignore all other logic
if (curParam != null && curParam.IsRemainder && curPos != endPos)
{
argBuilder.Append(c);
continue;
}

//If this character is escaped, skip it
if (isEscaping)
{
@@ -79,13 +86,6 @@ namespace Discord.Commands
continue;
}

//If we're processing an remainder parameter, ignore all other logic
if (curParam != null && curParam.IsRemainder && curPos != endPos)
{
argBuilder.Append(c);
continue;
}

//If we're not currently processing one, are we starting the next argument yet?
if (curPart == ParserPart.None)
{


正在加载...
取消
保存