bots
Installation
SKILL.md
Towns Protocol Bot SDK Reference
Critical Rules
MUST follow these rules - violations cause silent failures:
- User IDs are Ethereum addresses - Always
0x...format, never usernames - Mentions require BOTH -
<@{userId}>format in text ANDmentionsarray in options - Two-wallet architecture:
bot.viem.account.address= Gas wallet (signs & pays fees) - MUST fund with Base ETHbot.appAddress= Treasury (optional, for transfers)
- Slash commands DON'T trigger onMessage - They're exclusive handlers
- Interactive forms use
typeproperty - Notcase(e.g.,type: 'form') - Never trust txHash alone - Verify
receipt.status === 'success'before granting access