Class PermissionValidator
java.lang.Object
com.github.kaktushose.jda.commands.dispatching.validation.impl.PermissionValidator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(@NotNull Object argument, @NotNull Object annotation, @NotNull InvocationContext<?> context) Validates an argument.
-
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 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 discord permission
-