Buttons
Buttons appear inside Discord embeds and let users trigger automation flows with a single click.Adding a Button to an Embed
Place anerlc_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 theerlc_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.
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 aerlc_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
Useerlc_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 theerlc_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
Useerlc_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
Useerlc_modal_open to display a modal to the user. This block must run inside an interaction context (such as a button click handler).
Modal Field Blocks
Place these blocks inside theFIELDS statement of erlc_modal_open to define the form’s inputs.
Text Input
Text Input
erlc_modal_text_input — A single-line or multi-line text field.Checkbox
Checkbox
erlc_modal_checkbox — A single on/off checkbox.Checkbox Group
Checkbox Group
erlc_modal_checkbox_group — A group of checkboxes where users can select multiple options.Radio Group
Radio Group
erlc_modal_radio_group — A group of options where the user picks exactly one.Select Dropdown
Select Dropdown
erlc_modal_select — A dropdown select menu inside the modal.File Upload
File Upload
erlc_modal_file_upload — Lets the user attach one or more files.Option Block
Option Block
erlc_modal_option — Defines a single selectable option for radio groups, checkbox groups, and select menus.Handling Modal Submissions
Use theerlc_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 theerlc_when_discord_button trigger listens for it.
Modal with a Text Input Field
The JSON below opens a modal with a single short-text field asking for a reason.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.