Constructor
new TextInput()
- Description:
Creates a text input.
- Source:
- See:
Methods
setCustomID(id) → {TextInput}
- Description:
Set the custom id of the text input.
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
id |
String | The custom id of the text input. |
Returns:
- Type
- TextInput
setLabel(label) → {TextInput}
- Description:
Sets the text on the input label.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
label |
String | The text to display as a label to the input. |
Returns:
- Type
- TextInput
setMaxLength(length) → {TextInput}
- Description:
Set the maximum response length the user may enter.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
length |
Number | Maximum user input length. |
Returns:
- Type
- TextInput
setMinLength(length) → {TextInput}
- Description:
Set the minimum response length the user may enter.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
length |
Number | Minimum user input length. |
Returns:
- Type
- TextInput
setPlaceholder(placeholder) → {TextInput}
- Description:
Set the placeholder text of the text input.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
placeholder |
String | Placeholder text for the text input. |
Returns:
- Type
- TextInput
setStyle(style) → {TextInput}
- Description:
Sets the style of the text input.
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
style |
Number | The text input style. |
Returns:
- Type
- TextInput
setValue(value) → {TextInput}
- Description:
Set the default value of the text input.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
String | The value to pre-fill the text input with. |
Returns:
- Type
- TextInput
toJSON() → {Object}
- Description:
Returns the correct Discord format for a text input.
- Source:
Returns:
- Type
- Object