moymo,Docs
Skip to content
Components

Components overview ​

Components are the interactive parts of your messages and forms: buttons and select menus on a message, text inputs and menus in a modal. A member uses one, and your application receives an interaction carrying the custom_id you gave it.

What exists ​

ComponentTypeWhere
Action row1MessageHolds up to 5 buttons, or one menu
Button2MessagePrimary, secondary, success, danger or a link
String select3Message, modalA menu of up to 25 options you define
Text input4ModalOne line or a paragraph
User select5MessageChoose members of the server
Role select6MessageChoose roles
Mentionable select7MessageChoose members or roles
Channel select8MessageChoose channels
Label18ModalWraps one input or menu with a label and a description

Each page of this guide goes deeper:

How a press reaches you ​

  1. Your bot writes a message with components (Create message, or in an interaction response).
  2. A member presses a button. Their program tells Moymo; Moymo checks that the component is on that message, is not disabled, and (for a menu) that the choice is one of the options, then sends you an interaction of type 3.
  3. You answer: a new message, an update of the message, a form, or an acknowledgement.

Only your application hears of presses on your messages. A press on a component that is not on the message, or one a member's program made up, never reaches you.

Custom IDs ​

A custom_id is up to 100 characters that you choose; it comes back to you unchanged when the component is used. It has to be unique in its message. A good custom_id carries what you need to continue, because your program may have been restarted since the message was written: vote:poll-17:yes rather than yes.

Limits ​

Rows on a message5
Buttons in a row5
Menus in a row1 (and nothing else in that row)
Options in a string menu25
Values chosen in a menuup to 25
custom_id100 characters

Where members can use them ​

Buttons and menus are shown by Moymo for Windows, in the Servers add-on 1.19.0 or newer. A message with components still shows its text (and embeds) to everyone; a member on an older version simply does not see the controls. Layout components (containers, sections, galleries) are not supported yet.

The wiki is for Moymo's members and developers. Something wrong or missing? Use "Suggest a change" on any page.