Respond to Interaction with Advanced Message

BlockInteractions

Send a Components v2 response to an interaction (slash command, button, etc.).

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

Inputs

Message ComponentsRequired

Components of the response.

Holds blocks: Text, Message Container, Section, Action Row, Separator, Gallery

Allow Mentions

Choose which mention types should notify users. Empty or None disables all pings. None overrides other selections. Unselected mentions are displayed without pinging.

OptionsNoneEveryone/HereRolesUsers
Update Original Message

For component interactions and modals opened from a component, edit the original message instead of sending a new interaction response. Ignored otherwise.

Optionstruefalse
Ephemeral

Only visible to the user who triggered the interaction. Only applies to the initial response.

Optionstruefalse

Outputs

Message ID

ID of the sent or edited interaction response message.

Build a bot using blocks like Respond to Interaction with Advanced Message

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: respond_interaction_advanced
  • Only works in flows started by an interaction trigger (slash commands, buttons, dropdowns, modals, context menus).

Inputs

FieldInventScript nameValue
Message Componentsmessage_componentsblocks: func() { ... } with only advmsgcmp_layout_*, advmsgcmp_content_* blocks
Allow Mentionsallow_mentions"None", "Everyone/Here", "Roles", "Users"
Update Original Messageupdate_original_message"true", "false"
Ephemeralephemeral"true", "false"

Outputs

FieldInventScript nameValue
Message IDmessage_id

Example InventScript

interactionAdvanced := respond_interaction_advanced(Args{
	message_components: func() {
		advmsgcmp_layout_container(Args{accent_color: "#0099ff", spoiler: "true"})
	},
})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Message ID: " + interactionAdvanced.message_id,
})

More interactions blocks