Component Parameter Resolver
interface ComponentParameterResolver<T : ParameterResolver<T, R>, ComponentParameterResolver<T, R>, R : Any> : IParameterResolver<T> (source)
Parameter resolver for parameters of @JDAButtonListener and @JDASelectMenuListener.
Needs to be implemented alongside a ParameterResolver subclass.
Use case - Supporting serializable objects
If you need to pass serializable objects to your components, you can instead use @SerializableComponentData and let it generate a resolver for you.
Parameters
T
Type of the implementation
R
Type of the returned resolved objects
Functions
Link copied to clipboard
open fun resolve(option: ComponentOption, event: GenericComponentInteractionCreateEvent, data: SerializedComponentData): R?
Returns a resolved object from this component interaction.
Link copied to clipboard
open suspend fun resolveSuspend(option: ComponentOption, event: GenericComponentInteractionCreateEvent, data: SerializedComponentData): R?
Returns a resolved object from this component interaction.
Link copied to clipboard
Serializes an instance of the resolvable object.