Webhook or long polling, both work
- Webhook. Telegram calls your bot's HTTPS URL for every update. DenkOps gives every project an HTTPS URL, so
setWebhookpoints straight at it. - Long polling. Your bot keeps a connection open and asks Telegram for updates. That needs a process that never stops, which is exactly what a slot is.
What a bot usually needs
- The bot token as a secret. Store
BOT_TOKENas an environment variable. Your coding agent can set it without the token ever being written into code or chat logs. - State between messages. Conversations, user settings and queues go on the durable
/persistdisk or the key-value store in@denkopsai/sdk, and survive redeploys. - Scheduled messages. Daily digests and reminders run as managed cron jobs from
denkops.json. - Locked-down outbound traffic. Allow
api.telegram.organd the APIs your bot calls; everything else is blocked by default. - Logs. When the bot stops answering, ask your agent to read the logs and fix it.
Pick your stack
The guides below are complete, deployable bots in each framework. If your bot also needs to be an assistant tool, combine it with an MCP server, see a Telegram bot plus MCP.