Properties

Link copied to clipboard
abstract val componentType: ComponentType
Link copied to clipboard
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
open override val instance: T
Link copied to clipboard
abstract val lifetimeType: LifetimeType
Link copied to clipboard
open override var oneUse: Boolean

Sets this component as being usable once.

Link copied to clipboard
abstract val rateLimitGroup: String?
Link copied to clipboard

When true, resets the timeout duration everytime this component is used.

Link copied to clipboard
open override var singleUse: Boolean

Sets this component as being usable once.

Link copied to clipboard
abstract val timeout: ComponentTimeout?
Link copied to clipboard
abstract val timeoutDuration: Duration?

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
open override fun addPermissions(vararg permissions: Permission): T
@CheckReturnValue
open override fun addPermissions(permissions: Collection<Permission>): T

Adds permissions to the constraints

Link copied to clipboard
@CheckReturnValue
open override fun addRoleIds(vararg roleIds: Long): T
@CheckReturnValue
open override fun addRoleIds(roleIds: Collection<Long>): T

Adds role IDs to the constraints

Link copied to clipboard
@CheckReturnValue
open override fun addRoles(vararg roles: Role): T
@CheckReturnValue
open override fun addRoles(roles: Collection<Role>): T

Adds role IDs to the constraints

Link copied to clipboard
@CheckReturnValue
open override fun addUserIds(vararg userIds: Long): T
@CheckReturnValue
open override fun addUserIds(userIds: Collection<Long>): T

Adds user IDs to the constraints

Link copied to clipboard
@CheckReturnValue
open override fun addUsers(vararg users: UserSnowflake): T
@CheckReturnValue
open override fun addUsers(users: Collection<UserSnowflake>): T

Adds user IDs to the constraints

Link copied to clipboard
@CheckReturnValue
open override fun constraints(block: ReceiverConsumer<InteractionConstraints>): T

Allows manipulating the InteractionConstraints instance

@CheckReturnValue
open override fun constraints(constraints: InteractionConstraints): T

Replaces the current interaction constraints with the given ones.

Link copied to clipboard

Convenience extension to load an ComponentInteractionFilter service.

Link copied to clipboard
@CheckReturnValue
abstract fun noTimeout(): T

Removes the timeout from this component.

Link copied to clipboard
@CheckReturnValue
open override fun oneUse(oneUse: Boolean): T

Sets this component as being usable once.

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

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

Link copied to clipboard
abstract fun resetTimeoutOnUse(resetTimeoutOnUse: Boolean): T

When true, resets the timeout duration everytime this component is used.

Link copied to clipboard
@CheckReturnValue
open override fun singleUse(singleUse: Boolean): T

Sets this component as being usable once.

Link copied to clipboard
@CheckReturnValue
open fun timeout(timeout: Duration): T
abstract fun timeout(timeout: Duration): T
@CheckReturnValue
open fun timeout(timeout: Long, timeoutUnit: TimeUnit): T

Sets the timeout on this component, invalidating the component on expiration.