Fixed a couple arg parsing errors
This commit is contained in:
@@ -31,6 +31,8 @@ namespace Discord.Commands
|
|||||||
CommandMap nextGroup;
|
CommandMap nextGroup;
|
||||||
if (_subCommands.TryGetValue(nextPart, out nextGroup))
|
if (_subCommands.TryGetValue(nextPart, out nextGroup))
|
||||||
return nextGroup.GetMap(index + 1, parts);
|
return nextGroup.GetMap(index + 1, parts);
|
||||||
|
else
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,12 @@ namespace Discord.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (argList.Count < command.MinArgs)
|
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();
|
args = argList.ToArray();
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user