TextInput
Implementation of the Discord TextInput class in Luau
Properties
type
The type of component this is - for text inputs, this is always 4
customId
A developer-defined identifier for the text input, max 100 characters
style
The style of the text input field - can be single-line (SHORT) or multi-line (PARAGRAPH)
label
The label displayed above the text input field
minLength
The minimum length of text the user must input (0-4000)
maxLength
The maximum length of text the user can input (1-4000)
required
Whether this text input is required to be filled before the form can be submitted
value
Pre-filled value for the text input field
placeholder
Custom placeholder text shown when the text input field is empty
Methods
The TextInput instance has no set methods!
Functions
sync
TextInput . sync () -> ()
self: TextInput
textInputData: apiTypes.TextInputComponentObject
Responsible for syncing data to this text input object. This is typically called by the API when this object is created or updated.
new
TextInput . new () -> ()
textInputData: apiTypes.TextInputComponentObject
Responsible for constructing this class.