interactionMessageData := get_interaction_message_data(Args{interaction_token: "..."})
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Message ID: " + interactionMessageData.message_id,
})
Get Interaction Message Data
BlockInteractions
Get message, channel, and server data from an interaction response.
Inputs
Interaction TokenRequired
Token/secret of the interaction to inspect.
Outputs
Message ID
ID of the interaction response message.
Example: 123456789012345678
Channel ID
ID of the channel containing the interaction response message.
Example: 123456789012345678
Server ID
ID of the server containing the interaction response message. Empty in DMs.
Example: 123456789012345678
Build a bot using blocks like Get Interaction Message Data
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:
get_interaction_message_dataInputs
| Field | InventScript name | Value |
|---|---|---|
| Interaction Token | interaction_token |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Message ID | message_id | e.g. "123456789012345678" |
| Channel ID | channel_id | e.g. "123456789012345678" |
| Server ID | server_id | e.g. "123456789012345678" |
Example InventScript
More interactions blocks
Respond to Interaction with TextSend a text response to an interaction (slash command, button, etc.).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.Show ModalShow a modal dialog in response to an interaction.