Constructor
new TextInput()
- Source
Example
const { TextInput } = require("interactions.js");
const textInput = new TextInput()
.setCustomId("test")
.setPlaceholder("test")
.setStyle(TextInputStyles.Short)
.setLabel("test");
Methods
setCustomId(customId) → {TextInput}
set the custom id for the text input
Parameters:
Name | Type | Description |
---|---|---|
customId | string |
- Source
Returns:
- Type:
- TextInput
setLabel(label) → {TextInput}
Parameters:
Name | Type | Description |
---|---|---|
label | string |
- Source
Returns:
- Type:
- TextInput
setMaxLength(maxLength) → {TextInput}
set the max length of the text input
Parameters:
Name | Type | Description |
---|---|---|
maxLength | number |
- Source
Returns:
- Type:
- TextInput
setMinLength(minLength) → {TextInput}
set the min length of the text input
Parameters:
Name | Type | Description |
---|---|---|
minLength | number |
- Source
Returns:
- Type:
- TextInput
setPlaceholder(placeholder) → {TextInput}
set the placeholder of the text input
Parameters:
Name | Type | Description |
---|---|---|
placeholder | string |
- Source
Returns:
- Type:
- TextInput
setRequired(required) → {TextInput}
set the text input as required
Parameters:
Name | Type | Description |
---|---|---|
required | boolean |
- Source
Returns:
- Type:
- TextInput
setStyle(style) → {TextInput}
set the style of the text input
Parameters:
Name | Type | Description |
---|---|---|
style | number |
- Source
Returns:
- Type:
- TextInput
setValue(value) → {TextInput}
set the value of the text input
Parameters:
Name | Type | Description |
---|---|---|
value | string |
- Source
Returns:
- Type:
- TextInput