Skip to main content
Interactions let users interact with your bot through forms, buttons, text inputs, transaction requests, and signature requests.

Sending Interactions

Use handler.sendInteractionRequest() to send interactive UI elements to users. The method takes a channel ID and a payload object that defines the interaction type.

Forms (Buttons & Text Inputs)

Forms display buttons and text inputs that users can interact with. Use forms for menus, confirmations, polls, feedback collection, and multi-step flows. Set recipient to target a specific user, or omit it for public interactions anyone can respond to.
Component Types:

Transaction Requests

Prompt users to sign and execute blockchain transactions from their wallets. Use transactions for payments, token transfers, NFT minting, contract interactions, and DeFi operations. Set tx.signerWallet to require a specific wallet, or omit it to let users choose.

Signature Requests

Request cryptographic signatures without executing transactions. Use signatures for authentication, permissions, off-chain agreements, and gasless interactions. Supports EIP-712 typed data ('typed_data') and personal sign ('personal_sign').

Handling Responses

Use bot.onInteractionResponse() to handle user interactions. This callback fires whenever a user clicks a button, submits a form, completes a transaction, or signs a message. Available properties:
  • event.userId - The user who responded
  • event.channelId - Channel where interaction occurred
  • event.response.payload.content?.case - Type: 'form', 'transaction', or 'signature'
  • event.response.payload.content?.value - Response data

Complete Example: Poll

Reference

Form Request

Transaction Request

Signature Request

Next Steps