TypeClawTypeClaw
Reference

Telegram bot

Long-polling adapter — bot token setup, capabilities, and limits

Part of the channel adapters family.

Transport: long polling (no public URL required). Setup walkthrough: Add a channel.

Auth

One token, stored in secrets.json:

FieldValue
channels.telegram-bot.tokenTelegram bot token (from @BotFather)

CLI: typeclaw channel add telegram-bot (interactive), typeclaw channel set telegram-bot (rotate).

Only one poller per token

Only one process can long-poll a given bot token at a time. Running two instances against the same token causes them to steal updates from each other — messages will be silently dropped.

Capabilities

FeatureSupportedNotes
Outbound messagesyesMarkdownV2 formatting; reserved chars are escaped automatically
Reactionsno
Typing indicatoryessendChatAction; auto-expires ~5s; no explicit stop
Channel-name resolutionyes
Self identityyes
Historynochannel_history tool will fail for Telegram
AttachmentsyesSent as separate calls; land in chat root even for forum topics (sendDocument ignores message_thread_id); caption shares the 1024-char limit
MembershippartialBot API can't split bot/human counts; group reports humans = total-1, bots = 1

Config

{
  "channels": {
    "telegram-bot": {
      "enabled": true,
      "engagement": {
        "trigger": ["mention", "reply", "dm"],
        "stickiness": { "perReply": { "window": 900000 } }
      },
      "history": {
        "prefetch": {
          "thread": { "head": 3, "tail": 10 },
          "channel": { "tail": 10 }
        }
      },
      "quotedReply": { "enabled": true, "queueDelayMs": 10000 }
    }
  }
}

All fields above are shared across adapters. No adapter-specific extensions exist for telegram-bot. Credentials live in secrets.json#channels.telegram-bot.

See also

On this page