Package dev.sympho.bot_utils.component
Interface ComponentManager.HandlerFunction<C extends @NonNull ComponentManager.ComponentContext<?>>
- Type Parameters:
C- The context type.
- All Superinterfaces:
BiFunction<C,String, Mono<?>>
- All Known Subinterfaces:
ButtonManager.HandlerFunction,ModalManager.HandlerFunction
- Enclosing class:
- ComponentManager<E extends @NonNull ComponentInteractionEvent,
C extends @NonNull ComponentManager.ComponentContext<E>, HF extends @NonNull ComponentManager.HandlerFunction<C>, H extends @NonNull ComponentManager.Handler<H, HF>, HE extends @NonNull ComponentManager.HandlerEntry<H>>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
protected static interface ComponentManager.HandlerFunction<C extends @NonNull ComponentManager.ComponentContext<?>>
extends BiFunction<C,String,Mono<?>>
A function used to handle an interaction event.
- Since:
- 1.0
-
Method Summary
Methods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
apply
Handles an interaction event.- Specified by:
applyin interfaceBiFunction<C extends @NonNull ComponentManager.ComponentContext<?>,String, Mono<?>> - Parameters:
context- The interaction context.args- The argument string encoded in the components's custom ID. May be empty.- Returns:
- A Mono that completes once handling is completed.
-