Properties

Link copied to clipboard
override val componentType: ComponentType
Link copied to clipboard
Link copied to clipboard
open override val context: BContext
Link copied to clipboard

List of filters applied to this component.

Link copied to clipboard
open override val handler: ComponentHandler?
Link copied to clipboard
open override val instance: EphemeralButtonBuilder
Link copied to clipboard
open override val lifetimeType: LifetimeType
Link copied to clipboard
open override var oneUse: Boolean

Sets this component as being usable once.

Link copied to clipboard
open override val rateLimitGroup: String?
Link copied to clipboard
open override var resetTimeoutOnUse: Boolean

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
open override val timeout: ComponentTimeout?
Link copied to clipboard
open override val timeoutDuration: Duration?

Functions

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

Applies a filter to this component.

Link copied to clipboard
@CheckReturnValue
open override fun addPermissions(vararg permissions: Permission): EphemeralButtonBuilder
@CheckReturnValue
open override fun addPermissions(permissions: Collection<Permission>): EphemeralButtonBuilder

Adds permissions to the constraints

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

Adds role IDs to the constraints

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

Adds role IDs to the constraints

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

Adds user IDs to the constraints

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

Adds user IDs to the constraints

Link copied to clipboard
@CheckReturnValue
open override fun bindTo(handler: Consumer<ButtonEvent>): EphemeralButtonBuilder
open override fun bindTo(handler: suspend (ButtonEvent) -> Unit): EphemeralButtonBuilder

Binds the given handler to this component.

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

Allows manipulating the InteractionConstraints instance

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

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
open override fun noTimeout(): EphemeralButtonBuilder

Removes the timeout from this component.

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

Sets this component as being usable once.

Link copied to clipboard
@CheckReturnValue
open override fun rateLimitReference(group: String): EphemeralButtonBuilder

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

Link copied to clipboard
open override fun resetTimeoutOnUse(resetTimeoutOnUse: Boolean): EphemeralButtonBuilder

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

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

Sets this component as being usable once.

Link copied to clipboard
@CheckReturnValue
open override fun timeout(timeout: Duration, handler: Runnable): EphemeralButtonBuilder
open override fun timeout(timeout: Duration, handler: suspend () -> Unit): EphemeralButtonBuilder
@CheckReturnValue
open override fun timeout(timeout: Long, timeoutUnit: TimeUnit, handler: Runnable): EphemeralButtonBuilder

Sets the timeout on this component, invalidating the component on expiration, and running the given timeout handler.

@CheckReturnValue
open override fun timeout(timeout: Duration): EphemeralButtonBuilder
open override fun timeout(timeout: Duration): EphemeralButtonBuilder
@CheckReturnValue
open override fun timeout(timeout: Long, timeoutUnit: TimeUnit): EphemeralButtonBuilder

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