Class RoleValidator
java.lang.Object
com.github.kaktushose.jda.commands.dispatching.validation.impl.RoleValidator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(@NotNull Object argument, @NotNull Object annotation, @NotNull InvocationContext<?> context) Validates an argument.
-
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 interfaceValidator
- Parameters:
argument
- the argument to validateannotation
- the corresponding annotationcontext
- the correspondingInvocationContext
- Returns:
true
if the argument is a user or member that has the specified guild role
-