interactionText := respond_interaction_text(Args{message_content: "Hello world!"})
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Message ID: " + interactionText.message_id,
})
Respond to Interaction with Text
BlockInteractions
Send a text 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 ContentRequired
Text content of the response.
Example: Hello world!
Allow Mentions
Choose which mention types should notify users. Empty only pings users; 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 Text
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.
ID:
respond_interaction_text- Only works in flows started by an interaction trigger (slash commands, buttons, dropdowns, modals, context menus).
Inputs
| Field | InventScript name | Value |
|---|---|---|
| Message Content | message_content | e.g. "Hello world!" |
| Allow Mentions | allow_mentions | "None", "Everyone/Here", "Roles", "Users" |
| Update Original Message | update_original_message | "true", "false" |
| Ephemeral | ephemeral | "true", "false" |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Message ID | message_id |
Example InventScript
More interactions blocks
Defer InteractionAcknowledge an interaction and show a loading state. Use this when your response will take a while.Respond to Interaction with Advanced MessageSend a Components v2 response to an interaction (slash command, button, etc.).Embed Reply to InteractionSend an embed response to an interaction.Get Interaction Message DataGet message, channel, and server data from an interaction response.Show ModalShow a modal dialog in response to an interaction.