Browse Source

Add back the case for ParameterPreconditions

pull/735/head
Joe4evr GitHub 8 years ago
parent
commit
a245757792
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs

+ 3
- 0
src/Discord.Net.Commands/Builders/ModuleClassBuilder.cs 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}");


Loading…
Cancel
Save