io.github.freya022.botcommands.internal.modals.TextInputBuilderImpl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BotCommands Show documentation
Show all versions of BotCommands Show documentation
A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.
package io.github.freya022.botcommands.internal.modals
import io.github.freya022.botcommands.api.modals.TextInputBuilder
import net.dv8tion.jda.api.interactions.components.text.TextInput
import net.dv8tion.jda.api.interactions.components.text.TextInputStyle
internal class TextInputBuilderImpl internal constructor(
private val modalMaps: ModalMaps,
private val inputName: String,
label: String?,
style: TextInputStyle?
) : TextInputBuilder(label, style) {
override fun build(): TextInput {
internetSetId(modalMaps.insertInput(InputData(inputName)))
return jdaBuild()
}
}