Template

Telegram bot (Node.js, grammY)

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

Download ZIP (7.0 KB)

SHA-256: 52a7fa44e216db2b730c72186b85461af885fd438dfcea6d8a5b641783010fe2 (checksum file)

Stack: Node.js 20+, grammY 1.x · License: MIT · Files: 11

What it includes

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

File tree

telegram-grammy/
├── src/
│   ├── bot.js
│   ├── handlers.js
│   └── index.js
├── tests/
│   └── handlers.test.js
├── .dockerignore
├── .env.example
├── .gitignore
├── Dockerfile
├── LICENSE
├── package.json
└── README.md

Setup

unzip telegram-grammy.zip && cd telegram-grammy
npm install
cp .env.example .env
npm run dev
npm test

Fill in .env with credentials from the platform's official developer console. Never commit it: the included .gitignore excludes it.

Run with Docker

docker build -t telegram-grammy .
docker run --rm --env-file .env telegram-grammy

Official documentation

https://grammy.dev

All templates