Buttons Documentation

Overview

Messages can be sent with the components key to add buttons and other components (when discord brings them out), you can edit and add new buttons via editing the message, this is useful for the disabled key to stopping people from clicking it.

Example Payload

{
    "content": "this is an example message for components",
    "components": [
        {"type": 1, "components": [
            {"type": 2, "style": 2, "label": "Button 1", "custom_id": "1"},
            {"type": 2, "style": 2, "label": "Button 2", "custom_id": "2"}
        ]}
    ]
}

Message

Extending the message payload.

Component

ComponentType

ComponentStyle

PartialEmoji

InteractionData

Extending the interaction data payload.

Last updated