ConfirmObject

init

Creates a ConfirmObject instance.

Return: The ConfirmObject instance.

title

Sets the title for the ConfirmObject instance.

Return: The ConfirmObject instance.

text

Sets the text for the ConfirmObject instance.

Return: The ConfirmObject instance.

confirm

Sets the confirm button label for the ConfirmObject instance.

Return: The ConfirmObject instance.

deny

Sets the deny button label for the ConfirmObject instance.

Return: The ConfirmObject instance.

danger

Marks the ConfirmObject as dangerous.

Return: The ConfirmObject instance.

getMemento

Converts the ConfirmObject instance to a serializable format.

Return: (struct) A struct representing this ConfirmObject instance.

{
    "title": {
        "type": "plain_text",
        "text": "Are you sure?"
    },
    "text": {
        "type": "plain_text",
        "text": "Please confirm this action."
    },
    "confirm": {
        "type": "plain_text",
        "text": "Yes"
    },
    "deny": {
        "type": "plain_text",
        "text": "No"
    },
    "style": "optional, danger"
}

Last updated