Add back the case for ParameterPreconditions (#735)

This commit is contained in:
Joe4evr
2017-07-06 01:13:49 +02:00
committed by RogueException
parent 7597cf5baa
commit b6dcc9e8d8

View File

@@ -251,6 +251,9 @@ namespace Discord.Commands
builder.IsMultiple = true;
paramType = paramType.GetElementType();
break;
case ParameterPreconditionAttribute precon:
builder.AddPrecondition(precon);
break;
case RemainderAttribute _:
if (position != count - 1)
throw new InvalidOperationException($"Remainder parameters must be the last parameter in a command. Parameter: {paramInfo.Name} in {paramInfo.Member.DeclaringType.Name}.{paramInfo.Member.Name}");