Skip to content

TextInputBuilder

TextInputBuilder is used to construct a text input component for a Discord message.

Properties

Style

TextInputBuilder.Style  :: table

An enumeration of text input styles.

  • Short: 1
  • Paragraph: 2

Methods

setStyle

TextInputBuilder : setStyle (

     inputStyle: number
)  -> Builders.Interface.TextInputBuilder

Sets the style of the text input.

setLabel

TextInputBuilder : setLabel (

     label: string
)  -> Builders.Interface.TextInputBuilder

Sets the label of the text input.

setMinLength

TextInputBuilder : setMinLength (

     length: number
)  -> Builders.Interface.TextInputBuilder

Sets the minimum length of the text input.

setMaxLength

TextInputBuilder : setMaxLength (

     length: number
)  -> Builders.Interface.TextInputBuilder

Sets the maximum length of the text input.

setRequired

TextInputBuilder : setRequired (

     isRequired: boolean
)  -> Builders.Interface.TextInputBuilder

Sets whether the text input is required.

setDefaultValue

TextInputBuilder : setDefaultValue (

     value: string
)  -> Builders.Interface.TextInputBuilder

Sets the default value of the text input.

setPlaceholder

TextInputBuilder : setPlaceholder (

     value: string
)  -> Builders.Interface.TextInputBuilder

Sets the placeholder value of the text input.

toPayloadObject

TextInputBuilder : toPayloadObject ()  -> Network.Resolvable

Converts the text input to a JSON object that can be sent to the Discord API.

Functions

new

TextInputBuilder . new (

     textInputId: string
)  -> ()

Creates a new instance of TextInputBuilder.