Sending Interactions
Usehandler.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. Setrecipient to target a specific user, or omit it for public interactions anyone can respond to.
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. Settx.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
Usebot.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 respondedevent.channelId- Channel where interaction occurredevent.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
- Learn about onchain integrations for bot blockchain operations
- Explore slash commands
- Read about event handlers