Constructor
new Modal()
- Source
Example
const { Modal, TextInput, TextInputTypes } = require("interactions.js");
const modal = new Modal()
Methods
addComponent(component) → {Modal}
Add a component to the modal
Parameters:
Name | Type | Description |
---|---|---|
component | object | |
- Source
Returns:
- Type:
- Modal
addComponents(components) → {Modal}
Add an array of components to the modal
Parameters:
Name | Type | Description |
---|---|---|
components | array |
- Source
Returns:
- Type:
- Modal
setComponents(components) → {Modal}
Set the components of the modal
Parameters:
Name | Type | Description |
---|---|---|
components | array |
- Source
Returns:
- Type:
- Modal
setCustomId(customId) → {Modal}
set the custom id for the modal
Parameters:
Name | Type | Description |
---|---|---|
customId | string |
- Source
Returns:
- Type:
- Modal
setTitle(title) → {Modal}
set the title of the modal
Parameters:
Name | Type | Description |
---|---|---|
title | string |
- Source
Returns:
- Type:
- Modal