Class ConstraintMiddleware
java.lang.Object
io.github.kaktushose.jdac.dispatching.middleware.impl.ConstraintMiddleware
- All Implemented Interfaces:
Middleware, Consumer<InvocationContext<?>>
A
Middleware implementation that will check the parameter constraints a SlashCommandDefinition might have.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(InvocationContext<?> context) Checks if all parameters fulfill their constraints.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Middleware
runFor
-
Constructor Details
-
ConstraintMiddleware
-
-
Method Details
-
accept
Checks if all parameters fulfill their constraints. Will cancel theInvocationContextif a parameter constraint fails.- Specified by:
acceptin interfaceConsumer<InvocationContext<?>>- Specified by:
acceptin interfaceMiddleware- Parameters:
context- theInvocationContextto filter
-