IPersistentActionableComponent

Allows components to have persistent handlers bound to them.

These handlers are represented by a method with a JDAButtonListener or JDASelectMenuListener annotation on it, and will still exist after a restart.

Inheritors

Properties

Link copied to clipboard
abstract val context: BContext
Link copied to clipboard

List of filters applied to this component.

Link copied to clipboard
abstract val handler: ComponentHandler?
Link copied to clipboard
abstract val instance: T
Link copied to clipboard
abstract val rateLimitGroup: String?

Functions

Link copied to clipboard
@CheckReturnValue
open fun addFilter(filter: ComponentInteractionFilter<*>): T
@CheckReturnValue
open fun addFilter(filterType: Class<out ComponentInteractionFilter<*>>): T

Applies a filter to this component.

Link copied to clipboard
@CheckReturnValue
abstract fun bindTo(handlerName: String, block: ReceiverConsumer<PersistentHandlerBuilder>): T
@CheckReturnValue
open fun bindTo(handlerName: String, vararg data: Any?): T
@CheckReturnValue
open fun bindTo(handlerName: String, data: List<Any?>): T

Binds the given handler name with its arguments to this component.

Link copied to clipboard

Convenience extension to load an ComponentInteractionFilter service.

Link copied to clipboard
@CheckReturnValue
abstract fun rateLimitReference(group: String): T

Sets the rate limiter of this component to one declared by RateLimitProvider.