ModalBuilder

Properties

Link copied to clipboard
abstract val modals: Modals

Functions

Link copied to clipboard
@Nonnull
@ReplaceWith(value = "addComponents(ActionRow.of(components))")
open fun addActionRow(@Nonnull p0: MutableCollection<out ActionRowChildComponent>): Modal.Builder
@Nonnull
@ReplaceWith(value = "addComponents(ActionRow.of(component, components))")
open fun addActionRow(@Nonnull p0: ActionRowChildComponent, @Nonnull vararg p1: ActionRowChildComponent): Modal.Builder
Link copied to clipboard
@Nonnull
open fun addComponents(@Nonnull vararg p0: ModalTopLevelComponent): Modal.Builder
@Nonnull
open fun addComponents(@Nonnull p0: ComponentTree<out ModalTopLevelComponent>): 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.