Components
Building components
Components are built with a builder, which is a JavaScript class, which represents it. Within this builder you can customize the component so it's either text or color.
There are diffrent types of components' builders with diffrent customization but all have a common property: the custom Id. A unique identifier which is used for handling the interactions of the component.
ActionRow
All the builders are sent within an ActionRow
. Each message can contain a maxium of 5 actions row.
Here is how we create a basic ActionRow:
Building each component
Now we are going to build each type of component and set it within an ActionRow:
Sending the components
After creating the components you have to send the ActionRow into the components field. You can check example below: