Skip to content

Message Components

Message Components — buttons and selection menus that you can add to Custom Commands messages.


Interface#

Buttons#

button

Message Component Settings Interface for "Button"
  • Identifier — component identifier, enter something related to the component. It must be unique across all message components of this action;

    Information

    The message template of Action being executed by this button will get this identifier as component.id variable.

    Thus, this way you can determine what exact button has executed the Action.

  • Label — label displayed on the button;

  • Style — Button style. Check the following picture to compare the styles:
    button-style
  • ActionAction that will be executed on button click;
  • Disabled — checking this will make button inactive, unable to be pressed;
  • Add Emoji — Add an Emoji to the button.

Selection menus#

select-menu

Message Component Settings Interface for "Selection Menu"
  • Identifier — component identifier, enter something related to the component. It must be unique across all message components of this action;

    Information

    Action that has executed by selection menu, will get this identifier as component.id variable as well as list of selected options values as component.selectedOptions variable.

    Thus, this way you can determine what exact menu has executed the Action and what options were selected.

  • The minimum amount of values a user has to select — is self-explanatory, the minimum amount of values user has to select;

  • The maximum amount of values a user has to select — is self-explanatory, the maximum amount of values user is able to select;
  • Placeholder text if nothing is selected — is self-explanatory, a placeholder text if nothing is selected;
  • Selection Options — options to select;
  • ActionAction that will be executed by menu option selection;
  • Disabled — checking this will make menu inactive, unable to be pressed.

select-menu-option

Select Option Settings Interface
  • Label — Label of the select option;
  • Value — Value of the select option, enter something related to this option. It must be unique across all options of this menu;

    Information

    This value will be passed to component.selectedOptions list variable.

    Thus, this way you can determine in Action what exact options were selected.

  • Description — select option description;

  • Selected by default — checking this will make this options to be selected by default;
  • Add Emoji — Add an Emoji to the select option.

Limitations#

Limitations

Message components have some limitations:

  1. Up to 5 rows of message components;

  2. Up to 5 buttons per row;

  3. Up to 1 selection menu per row;

  4. You can't have selection menu and button on the same row at the same time;

  5. Up to 25 choices in one selection menu.