VXIL

interaction.button_clicked

Fired when a user clicks a button component from a bot message

When to use this

Handle button choices (Yes / No) and branch bot behavior.

Auth

Requires authenticated bot Socket.IO connection.

Event Payload

FieldTypeDescription
interaction_idstringIdentifier for acknowledgment endpoint
custom_idstringButton ID from message component
message_idstringSource message
conversation_idstringConversation context
user{ id: string; username: string }Clicking user
clicked_atstringISO timestamp

Follow-up

Call POST /api/bot/v1/interactions/{interactionId}/ack once per interaction.

Errors

If interaction expires before ack, REST ack endpoint returns 404 or 409.

cURL

Not applicable for inbound events.

TypeScript

socket.on("interaction.button_clicked", async (event) => {
  if (event.custom_id === "confirm_yes") {
    // business logic
  }
});

Retry behavior

Deduplicate by interaction_id and avoid double-acking.

On this page