yagop/node-telegram-bot-api

Telegram Bot API for NodeJS

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 51 minutes ago
Added to GitGenius on September 7th, 2026
Created on June 28th, 2015
Open Issues & Pull Requests: 0 (+0)
GitHub issues: Enabled
Number of forks: 1,644
Total Stargazers: 9,205 (+0)
Total Subscribers: 159 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 22.2 days
Mean response time: 286.4 days
90th percentile: 965.8 days
Tracked items: 174

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 5% of issues opened in the past year have been closed. Three people close 85% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 1
New in 7 days: 4
Closed in 7 days: 3
Avg open age: 1 days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 4
Closed in 7 days: 3
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • question (16)
  • close-on-next-release (7)
  • investigate (7)
  • feat:regexp (4)
  • src:telegram (3)
  • bug (2)
  • enhancement (2)
  • sorry! my bad! (2)

Detailed Description

node-telegram-bot-api is a Telegram Bot API library for Node.js that runs on Bun, modern Node.js, Deno, Cloudflare Workers, and Vercel Functions.

The library solves the problem of building Telegram bots by providing a complete wrapper around the Telegram Bot API. It mirrors the wire API one-to-one with a single params object per method, while layering optional abstractions on top. The core approach uses koa-style middleware around every update, with filters like `on`, `command`, and `hears` integrated into the same chain. Keyboards and formatting use plain typed objects that can be passed as literals or built with a fluent builder. File uploads stream bytes directly from their source into requests, keeping memory flat regardless of file size; the tool handles retries for `Blob` and `Uint8Array` uploads but treats `ReadableStream` as one-shot to surface failures immediately.

Developers should choose this tool if they need to build Telegram bots for serverless environments or traditional Node servers. The webhook implementation uses web-standard callbacks as pure `(Request) => Promise<Response>` functions, making it compatible with Cloudflare Workers, Bun.serve, Deno Deploy, Vercel Edge, Next.js App Router, Express, and self-hosted Node servers. The library includes opt-in session middleware for persistent per-chat state, with an explicit store requirement so durability choices are never implicit. This design means the same code works under both one-invocation-per-update serverless and long-polling architectures. The v2 redesign is a from-scratch rewrite with no backward compatibility to v1.

The project maintains active development with regular updates and refinements to its API surface. The codebase is written in TypeScript, providing type safety throughout. The tool demonstrates attention to production concerns like webhook authentication via secret tokens and explicit session management patterns that avoid hidden state.