ModalBuilder

Functions

Link copied to clipboard
@Nonnull
open fun addActionRow(@Nonnull vararg p0: ItemComponent): Modal.Builder
@Nonnull
open fun addActionRow(@Nonnull p0: MutableCollection<out ItemComponent>): Modal.Builder
Link copied to clipboard
@Nonnull
open fun addComponents(@Nonnull vararg p0: LayoutComponent): Modal.Builder
@Nonnull
open fun addComponents(@Nonnull p0: MutableCollection<out LayoutComponent>): Modal.Builder
Link copied to clipboard
@CheckReturnValue
fun bindTo(handler: Consumer<ModalEvent>): ModalBuilder

Binds the action to the consumer.

abstract fun bindTo(handler: suspend (ModalEvent) -> Unit): ModalBuilder

Binds the action to the closure.

@CheckReturnValue
fun bindTo(handlerName: String, vararg userData: Any?): ModalBuilder
@CheckReturnValue
abstract fun bindTo(handlerName: String, userData: List<Any?>): ModalBuilder

Binds the action to a @ModalHandler with its arguments.

Link copied to clipboard
@CheckReturnValue
abstract override fun build(): Modal
Link copied to clipboard
Link copied to clipboard
@Nonnull
open fun getId(): String
Link copied to clipboard
@Nonnull
open fun getTitle(): String
Link copied to clipboard
fun ModalBuilder.paragraphTextInput(inputName: String, label: String, block: TextInputBuilder.() -> Unit = {}): TextInput
Link copied to clipboard
abstract override fun setId(customId: String): ModalBuilder
Link copied to clipboard
@Nonnull
open fun setTitle(@Nonnull p0: String): Modal.Builder
Link copied to clipboard
fun ModalBuilder.shortTextInput(inputName: String, label: String, block: TextInputBuilder.() -> Unit = {}): TextInput
Link copied to clipboard
fun ModalBuilder.textInput(inputName: String, label: String, inputStyle: TextInputStyle, block: TextInputBuilder.() -> Unit = {}): TextInput
Link copied to clipboard
@CheckReturnValue
fun timeout(timeout: Duration, onTimeout: Runnable? = null): ModalBuilder
abstract fun timeout(timeout: Duration, onTimeout: suspend () -> Unit? = null): ModalBuilder
@CheckReturnValue
fun timeout(timeout: Long, unit: TimeUnit, onTimeout: Runnable? = null): ModalBuilder

Sets the timeout for this modal, invalidating the modal after expiration, and running the given timeout handler.