tg-bot-ops
Installation
SKILL.md
tg-bot-ops
Checked against the official docs on 2026-10-30: Bot API 10.3 (August 24, 2026). Reports from trackers are labeled with their date. No scenario here was run against a live bot; scripts/retry_policy.py has unit tests on simulated responses.
Webhook or polling
Mutually exclusive. Either way, Telegram keeps undelivered updates at most 24 hours.
| Long polling | Webhook | |
|---|---|---|
| Fits | one process, no public HTTPS, a local machine | several workers, serverless |
| Ack | next getUpdates with a higher offset |
your 2xx response |
| Limits | limit 1-100, timeout above 0 |
ports 443, 80, 88, 8443; max_connections 1-100, default 40 |
| Failure | the same updates return until offset moves |
non-2xx is repeated, then Telegram gives up "after a reasonable amount of attempts" |
Switching: getUpdates doesn't work while a webhook is set; use deleteWebhook. Keep drop_pending_updates off on a selling bot: it discards unprocessed successful_payment messages too.
Monitor getWebhookInfo: pending_update_count, last_error_message, last_error_date, allowed_updates.