Constructor
new ModalComponents() → {ModalComponents}
Returns:
- Type:
- ModalComponents
Example
const textInput = interaction.components.getValueById("test"); // returns the field value
const textInputTwo = interaction.components.getDataById("testTwo"); // returns the field as object
Members
components :Array.<object>|array
the interaction components data
Type:
- Array.<object> |
array
Methods
getComponents() → {Array.<object>}
Get the interaction components
Returns:
- Type:
- Array.<object>
getDataById(id) → {object}
Get a field by id
Parameters:
Name | Type | Description |
---|---|---|
id | string |
Returns:
- Type:
- object
Example
const textInput = interaction.components.getDataById("textInput"); // returns the field as object
getValueById(id) → {string}
Get the interaction components value
Parameters:
Name | Type | Description |
---|---|---|
id | string |
Returns:
- Type:
- string
Example
const textInput = interaction.components.getValueById("textInput"); // returns the field value