Class RoleValidator

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

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

    • RoleValidator

      public RoleValidator()
  • 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 guild role.
      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 guild role