Class PermissionValidator

java.lang.Object
com.github.kaktushose.jda.commands.dispatching.validation.impl.PermissionValidator
All Implemented Interfaces:
Validator

public class PermissionValidator extends Object implements Validator
A Validator implementation that checks the Perm constraint.
See Also:
  • Constructor Details

    • PermissionValidator

      public PermissionValidator()
  • Method Details

    • apply

      public boolean apply(@NotNull @NotNull Object argument, @NotNull @NotNull Object annotation, @NotNull @NotNull InvocationContext<?> context)
      Validates an argument. The argument must be a user or member that has the specified discord permission.
      Specified by:
      apply in interface Validator
      Parameters:
      argument - the argument to validate
      annotation - the corresponding annotation
      context - the corresponding InvocationContext
      Returns:
      true if the argument is a user or member that has the specified discord permission