Show Modal

BlockInteractions

Show a modal dialog in response to an interaction.

  • Only works in flows started by an interaction: a slash command, button, dropdown, modal or context menu.

Inputs

Custom IDRequired

Custom ID for the modal (1-100 chars).

Example: report_modal_123

TitleRequired

Modal title (1-45 chars).

Example: Bug Report

ComponentsRequired

Between 1 and 5 modal components.

Holds blocks: Modal Label

Build a bot using blocks like Show Modal

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: show_modal
  • Only works in flows started by an interaction trigger (slash commands, buttons, dropdowns, modals, context menus).

Inputs

FieldInventScript nameValue
Custom IDcustom_ide.g. "report_modal_123"
Titletitlee.g. "Bug Report"
Componentscomponentsblocks: func() { ... } with only modalcmp_layout_label* blocks

Example InventScript

show_modal(Args{
	custom_id: "report_modal_123",
	title:     "Bug Report",
	components: func() {
		modalcmp_layout_label(Args{label: "Reason"})
	},
})

More interactions blocks