discordcr icon indicating copy to clipboard operation
discordcr copied to clipboard

Buttons

Open PixeLInc opened this issue 3 years ago • 1 comments

Buttons are fast approaching, along with other fancy new interactive user elements.

Buttons are grouped inside of a generic component group (type: 1) of interactive elements. Example payload:

{
  "content": "buttons!",
  "components": [
    {
      "type": 1,
      "components": [
        {
          "type": 2,
          "style": 1,
          "custom_id": "test",
          "label": "Blurple Button"
        },
        {
          "type": 2,
          "style": 2,
          "custom_id": "test",
          "label": "Gray Button"
        },
        {
          "type": 2,
          "style": 3,
          "custom_id": "test",
          "label": "Green Button"
        },
        {
          "type": 2,
          "style": 4,
          "custom_id": "test",
          "label": "Red Button"
        },
        {
          "type": 2,
          "style": 5,
          "url": "https://google.com",
          "label": "Link Button"
        }
      ]
    }
  ]
}

In the future, you will be able to place other interactive elements inside of component type 1. When working on this API, it should be pretty generic so we can support any number of possible interactive components that are added in the future.

This issue will be updated once more info comes out (which should be within the next week or so) with links and more docs.

PixeLInc avatar Apr 23 '21 01:04 PixeLInc

Closed by #31

PixeLInc avatar Oct 30 '21 14:10 PixeLInc