Browse Source

Resolve #251

tags/1.0-rc
FiniteReality 8 years ago
parent
commit
42e127ac85
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/Discord.Net.Commands/CommandParser.cs

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

@@ -150,6 +150,8 @@ namespace Discord.Commands
for (int i = argList.Count; i < command.Parameters.Count; i++)
{
var param = command.Parameters[i];
if (param.IsMultiple)
continue;
if (!param.IsOptional)
return ParseResult.FromError(CommandError.BadArgCount, "The input text has too few parameters.");
argList.Add(TypeReaderResult.FromSuccess(param.DefaultValue));


Loading…
Cancel
Save