TextInputBuilder
export declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> implements Equatable<JSONEncodable<APITextInputComponent> | APITextInputComponent>
export declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> implements Equatable<JSONEncodable<APITextInputComponent> | APITextInputComponent>
No summary provided.
Extends
ComponentBuilder<APITextInputComponent>Implements
Equatable<JSONEncodable<APITextInputComponent> | APITextInputComponent>constructor(data?)
Constructs a new instance of the
TextInputBuilder
className | Type | Optional | Description |
---|---|---|---|
data | APITextInputComponent & { type?: ComponentType.TextInput; } | Yes | None |
Readonly
data
:
Partial<DataType>
The API data associated with this component
Inherited from ComponentBuilderequals(other)
:
boolean
Whether or not this is equal to another structure
Name | Type | Optional | Description |
---|---|---|---|
other | JSONEncodable<APITextInputComponent> | APITextInputComponent | No | None |
setCustomId(customId)
:
this
Sets the custom id for this text input
Name | Type | Optional | Description |
---|---|---|---|
customId | string | No | The custom id of this text input |
setLabel(label)
:
this
Sets the label for this text input
Name | Type | Optional | Description |
---|---|---|---|
label | string | No | The label for this text input |
setMaxLength(maxLength)
:
this
Sets the maximum length of text for this text input
Name | Type | Optional | Description |
---|---|---|---|
maxLength | number | No | The maximum length of text for this text input |
setMinLength(minLength)
:
this
Sets the minimum length of text for this text input
Name | Type | Optional | Description |
---|---|---|---|
minLength | number | No | The minimum length of text for this text input |
setPlaceholder(placeholder)
:
this
Sets the placeholder of this text input
Name | Type | Optional | Description |
---|---|---|---|
placeholder | string | No | The placeholder of this text input |
setRequired(required?)
:
this
Sets whether this text input is required
Name | Type | Optional | Description |
---|---|---|---|
required | boolean | Yes | Whether this text input is required |
setStyle(style)
:
this
Sets the style for this text input
Name | Type | Optional | Description |
---|---|---|---|
style | TextInputStyle | No | The style for this text input |
setValue(value)
:
this
Sets the value of this text input
Name | Type | Optional | Description |
---|---|---|---|
value | string | No | The value for this text input |
toJSON()
:
APITextInputComponent
Serializes this component to an API-compatible JSON object