Skip to main content
Common issues and solutions for Towns bots.

Bot Doesn’t Respond

Check:
  1. APP_PRIVATE_DATA and JWT_SECRET are correct
  2. ✅ Webhook URL is accessible: https://your-bot.com/webhook
  3. ✅ Bot is installed in the space (Space Settings → Bots)
  4. ✅ Forwarding setting is correct:
    • “All Messages” - Receives everything
    • “Mentions, Commands, Replies & Reactions” (Default) - Only @mentions, commands, replies
    • “No Messages” - Receives nothing
Test webhook:

Lost Context Between Events

The bot framework is stateless. Each event is isolated - no access to previous messages or conversation history.
Solution: Store context externally:
For production, use a database. See Storing State.

Transaction Errors

Problem: Your bot treasury wallet (bot.appAddress) needs ETH for gas. Solution:
Fund bot.appAddress (the app contract), not bot.botId (the signer). See Wallet Architecture.

Can’t Mention Users

Slash Commands Not Showing

Fix:

Rate Limiting

Use a better RPC:
Get free RPC from Alchemy or Infura.

Bot Crashes

Add error handling:

Next Steps