Skip to main content
Studio lets you build interactive Discord interfaces that respond to real user input — from clickable buttons and dropdown menus to full pop-up modal forms. This page explains how to create each type of interactive component, attach event triggers, and read the data that users submit.

Buttons

Buttons appear inside Discord embeds and let users trigger automation flows with a single click.

Adding a Button to an Embed

Place an erlc_embed_button block inside any embed’s BLOCKS statement to add a clickable button. Use erlc_embed_link_button to create a button that opens an external URL rather than firing an event. It accepts the same LABEL, EMOJI, and DISABLED inputs, plus a URL input for the destination link.
Link buttons do not trigger automation events. Only erlc_embed_button (with a CUSTOM_ID) fires the erlc_when_discord_button trigger.

Handling Button Clicks

Use the erlc_when_discord_button trigger block to run a flow when a user clicks a specific button. Set the BUTTON_ID field to match the CUSTOM_ID of the button you want to handle. Inside the triggered flow, read the click context using erlc_discord_event_value and selecting the ButtonId field to retrieve which button was clicked. To programmatically disable a button after it is clicked, use erlc_bot_disable_clicked_button. This block requires no inputs and automatically targets the button that triggered the current event.
Use erlc_bot_disable_clicked_button immediately after handling a one-time action (such as approving a request) to prevent duplicate submissions.

Select Menus

Select menus give users a dropdown of choices to pick from. You can embed them directly in an embed or send them as a standalone message.

Embed Select Menu

Add a erlc_embed_select_menu block inside an embed’s BLOCKS statement and nest erlc_embed_select_option blocks inside its OPTIONS statement. erlc_embed_select_menu fields and inputs: erlc_embed_select_option inputs:

Standalone Select Menu

Use erlc_bot_send_select_menu to send a select menu as a standalone message in a channel without wrapping it in an embed. For resource-based menus — where options are populated dynamically from your server’s data — use erlc_bot_send_resource_select instead.

Handling Select Events

Use the erlc_when_discord_select trigger and set its CUSTOM_ID field to match the menu you want to handle. Read the user’s selection with erlc_discord_event_value:

Polls

Use erlc_bot_send_poll to send a native Discord poll to a channel.

Modals

Modals are pop-up forms that appear inside Discord when triggered by a button click or slash command interaction. They can collect text input, checkboxes, radio selections, file uploads, and more.

Opening a Modal

Use erlc_modal_open to display a modal to the user. This block must run inside an interaction context (such as a button click handler). Place these blocks inside the FIELDS statement of erlc_modal_open to define the form’s inputs.
erlc_modal_text_input — A single-line or multi-line text field.
erlc_modal_checkbox — A single on/off checkbox.
erlc_modal_checkbox_group — A group of checkboxes where users can select multiple options.
erlc_modal_radio_group — A group of options where the user picks exactly one.
erlc_modal_select — A dropdown select menu inside the modal.
erlc_modal_file_upload — Lets the user attach one or more files.
erlc_modal_option — Defines a single selectable option for radio groups, checkbox groups, and select menus.

Handling Modal Submissions

Use the erlc_when_discord_modal trigger and set its CUSTOM_ID field to match the CUSTOM_ID you provided to erlc_modal_open. Read submitted values using erlc_discord_event_value with one of the following fields:

Examples

Embed with a Button + Click Handler

The JSON below sends an embed with a “Confirm” button, then shows how the erlc_when_discord_button trigger listens for it.
The corresponding button trigger and handler:

The JSON below opens a modal with a single short-text field asking for a reason.
The modal submit trigger:
Use erlc_discord_event_value with the ModalValue field inside your erlc_when_discord_modal flow to read what the user typed into report_reason.