Browse Source

Fixed a couple arg parsing errors

tags/docs-0.9
RogueException 9 years ago
parent
commit
9a783df90a
2 changed files with 8 additions and 1 deletions
  1. +2
    -0
      src/Discord.Net.Commands/CommandMap.cs
  2. +6
    -1
      src/Discord.Net.Commands/CommandParser.cs

+ 2
- 0
src/Discord.Net.Commands/CommandMap.cs View File

@@ -31,6 +31,8 @@ namespace Discord.Commands
CommandMap nextGroup;
if (_subCommands.TryGetValue(nextPart, out nextGroup))
return nextGroup.GetMap(index + 1, parts);
else
return null;
}
return this;
}


+ 6
- 1
src/Discord.Net.Commands/CommandParser.cs View File

@@ -148,7 +148,12 @@ namespace Discord.Commands
}

if (argList.Count < command.MinArgs)
return CommandErrorType.BadArgCount;
{
/*if (command._parameters[command._parameters.Length - 1].Type == ParameterType.Unparsed)
argList.Add("");
else*/
return CommandErrorType.BadArgCount;
}

args = argList.ToArray();
return null;


Loading…
Cancel
Save