class TextInputBuilder
implements
Equatable<APITextInputComponent | JSONEncodable<APITextInputComponent>>extends
ComponentBuilder<APITextInputComponent>export declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> implements Equatable<APITextInputComponent | JSONEncodable<APITextInputComponent>>A builder that creates API-compatible JSON data for text inputs.
Constructors
constructor(data?: APITextInputComponent & { type?: ComponentType.TextInput; })
data?: APITextInputComponent & { type?: ComponentType.TextInput; }
Creates a new text input from API data.
readonlydata : Partial<APITextInputComponent>
The API data associated with this component.
Inherited from: ComponentBuilder
equals() : boolean
Whether this is equal to another structure.
setCustomId(customId: string) : this
customId: string
Sets the custom id for this text input.
setLabel(label: string) : this
label: string
Sets the label for this text input.
setMaxLength(maxLength: number) : this
maxLength: number
Sets the maximum length of text for this text input.
setMinLength(minLength: number) : this
minLength: number
Sets the minimum length of text for this text input.
setPlaceholder(placeholder: string) : this
placeholder: string
Sets the placeholder for this text input.
setRequired(required?: boolean) : this
required?: boolean
Sets whether this text input is required.
setStyle(style: TextInputStyle) : this
style: TextInputStyle
Sets the style for this text input.
setValue(value: string) : this
value: string
Sets the value for this text input.
toJSON() : APITextInputComponent
Serializes this builder to API-compatible JSON data.