Skip to content

Modal

A modal message with components.

Kind: global class

new Modal(data)

ParamTypeDescription
dataObjectThe data for the modal message.
data.titlestringThe title of the modal.
data.custom_idstringThe custom ID of the modal.

modal.addComponents(…components) ⇒ Modal

Adds one or more components to the modal.

Kind: instance method of Modal
Returns: Modal - This modal instance.

ParamTypeDescription
…componentsArray.<Object>The components to add.

modal.toJSON() ⇒ Object

Returns a JSON representation of the modal.

Kind: instance method of Modal
Returns: Object - The JSON representation of the modal.