Templates

Starter bot templates

Small, reviewed starter projects you can download, verify with SHA-256 and deploy.

Every template ships with a README in English and Spanish, .env.example, a Dockerfile, unit tests that pass without network access and an MIT license. The ZIPs are generated when the site is built and publish their SHA-256 checksum so you can verify the download.

Telegram

Telegram bot (Node.js, grammY)

Commands, a per-chat throttle, long polling for development and a webhook mode with secret-token verification and /healthz.

Node.js 20+, grammY 1.x · 7.0 KB

Telegram

Telegram bot (Python, aiogram 3)

Routers, typed handlers, polling or an aiohttp webhook server with secret-token verification and /healthz.

Python 3.10+, aiogram 3.x · 6.6 KB

Discord

Discord bot (Node.js, discord.js 14)

Slash commands with a registration script, Guilds intent only, ephemeral replies and mentions disabled in echoed text.

Node.js 20+, discord.js 14 · 6.2 KB

Discord

Discord bot (Python, discord.py 2)

App commands with a CommandTree, default intents only, guild sync for fast iteration and mentions disabled.

Python 3.10+, discord.py 2.x · 5.0 KB

WhatsApp

WhatsApp Cloud API webhook (Node.js)

Verification handshake, X-Hub-Signature-256 validation, acknowledge-first handling, deduplication and text or button replies.

Node.js 20+, no dependencies · 7.0 KB

WhatsApp

WhatsApp Cloud API webhook (Python, FastAPI)

FastAPI webhook with signature validation, background replies after the 200 response, deduplication and /healthz.

Python 3.10+, FastAPI, httpx · 6.9 KB

Slack

Slack app (Node.js, Bolt)

Slash command, threaded replies to mentions and an App Home tab, in Socket Mode or HTTP mode with signature verification.

Node.js 20+, @slack/bolt 4 · 5.2 KB

Telegram

Telegram bot (Node.js, Telegraf)

Long-polling starter with /start, /help, /ping and echo, clean SIGINT/SIGTERM shutdown.

Node.js 20+, Telegraf 4.x · 3.3 KB

Telegram

Telegram webhook (Node.js http)

Minimal HTTP webhook with secret-token check, /healthz, fast 200 and async sendMessage.

Node.js 20+, no dependencies · 3.9 KB

Telegram

Telegram webhook bot on Cloudflare Workers

Serverless webhook with constant-time secret-token check, replies in the webhook response and a protected /setup route.

Cloudflare Workers, no runtime dependencies · 5.7 KB

Telegram

Telegram webhook (Fastify)

Fastify webhook with secret_token check, raw JSON parser, /healthz and async sendMessage.

Node.js 20+, Fastify 5 · 4.0 KB

Telegram

Telegram webhook (Flask)

Flask webhook with secret_token check, /healthz and ACK-first replies.

Python 3.12+, Flask 3 · 3.9 KB

Discord

Discord interactions HTTP endpoint

Ed25519 verification, PING/PONG and a minimal slash reply.

Node.js 20+, tweetnacl · 3.8 KB

Slack

Slack signed HTTP ACK stub

Verifies Slack signing secret and ACKs slash commands without Bolt.

Node.js 20+, no dependencies · 3.8 KB

WhatsApp

WhatsApp verify + signature stub

GET hub.challenge verify and POST X-Hub-Signature-256 check.

Node.js 20+, no dependencies · 3.8 KB

DevOps

Healthz/Readyz microservice

Tiny /healthz and /readyz JSON endpoints for probes.

Node.js 20+ · 2.9 KB

DevOps

Interval tick worker

Background interval worker with SIGTERM stop — not a chat process.

Node.js 20+ · 3.0 KB

Architecture

In-memory idempotency demo

Deduplicate event ids in one process (swap for Redis/DB in prod).

Node.js 20+ · 3.2 KB

Reliability

In-memory rate limit demo

Fixed-window limiter for single-process demos.

Node.js 20+ · 3.1 KB

Security

Generic HMAC webhook verifier

HMAC-SHA256 hex compare on raw body with configurable header.

Node.js 20+ · 3.4 KB

Telegram

Telegram long polling minimal

getUpdates loop with offset tracking and SIGTERM stop.

Node.js 20+ · 3.3 KB

Security

Express raw-body HMAC pattern

Captures req.rawBody before JSON parse for signature checks.

Node.js 20+, Express 4 · 3.3 KB

Telegram

Telegram webhook (FastAPI)

FastAPI webhook with secret_token and background sendMessage.

Python 3.12+, FastAPI, httpx · 3.8 KB

Discord

Discord guild command registrar

PUTs a /ping guild slash command via REST.

Node.js 20+ · 3.3 KB

Security

HMAC signed URL helper

Issue and verify short-lived signed download URLs.

Node.js 20+ · 3.5 KB

Architecture

In-memory queue worker

HTTP enqueue with background drain — swap for a real queue in prod.

Node.js 20+ · 3.3 KB

DevOps

Fail-fast env validation

Exits on boot if required env keys are missing or placeholders.

Node.js 20+ · 3.0 KB

Security

Flask HMAC webhook

HMAC-SHA256 verify of raw body with compare_digest.

Python 3.12+, Flask 3 · 3.3 KB

Discord

Discord interactions on Cloudflare Workers

Worker stub for interactions; add Ed25519 verify before production.

Cloudflare Workers · 3.6 KB

DevOps

Graceful HTTP shutdown sketch

Stops accepting connections on SIGTERM with a drain timeout.

Node.js 20+ · 3.1 KB

Verify a download

sha256sum -c telegram-grammy.zip.sha256   # Linux
shasum -a 256 telegram-grammy.zip         # macOS
Get-FileHash telegram-grammy.zip          # Windows PowerShell