Class ModalBuilder
java.lang.Object
io.github.kaktushose.jdac.dispatching.reply.dynamic.ModalBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionModalBuilder(ReplyableEvent<?> event, CustomId customId, ModalDefinition modalDefinition) Constructs a newModalBuilder. -
Method Summary
Modifier and TypeMethodDescriptionnet.dv8tion.jda.api.modals.Modalbuild()Builds theModal.modify(Function<net.dv8tion.jda.api.modals.Modal.Builder, net.dv8tion.jda.api.modals.Modal.Builder> callback) placeholder(Entry... placeholder) textInput(String textInput, Function<net.dv8tion.jda.api.components.textinput.TextInput.Builder, net.dv8tion.jda.api.components.textinput.TextInput.Builder> callback) Allows modification of a text input with the given callback.
-
Constructor Details
-
ModalBuilder
Constructs a newModalBuilder.- Parameters:
customId- theCustomIdtheModalshould have in the endmodalDefinition- theModalDefinitionto modify
-
-
Method Details
-
title
- See Also:
-
placeholder
- Parameters:
placeholder- the placeholders to be used for localization
-
textInput
public ModalBuilder textInput(String textInput, Function<net.dv8tion.jda.api.components.textinput.TextInput.Builder, net.dv8tion.jda.api.components.textinput.TextInput.Builder> callback) Allows modification of a text input with the given callback.- Parameters:
textInput- the name of the method parameter the text input is assigned tocallback- theFunctionto modify the text input- Returns:
- this instance for fluent interface
- See Also:
-
modify
public ModalBuilder modify(Function<net.dv8tion.jda.api.modals.Modal.Builder, net.dv8tion.jda.api.modals.Modal.Builder> callback) - Parameters:
callback- aFunctionthat allows to modify the resulting jda object. The passed function will be called after all modifications except localization are made by jda-commands, shortly before the component is localized and then registered in the message
-
build
public net.dv8tion.jda.api.modals.Modal build()Builds theModal.
-