ComponentParameterResolver

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

Returns a resolved object from this component interaction.

Link copied to clipboard

Returns a resolved object from this component interaction.

Link copied to clipboard
abstract fun serialize(obj: R): SerializedComponentData

Serializes an instance of the resolvable object.