A modern framework for building Telegram bots with Node.js and TypeScript, featuring full API support and extensible middleware.
Telegraf is a modern framework for creating Telegram bots using Node.js and TypeScript. It provides a simple API to handle messages, commands, and interactions automatically, serving as an interface between Telegram and code running on a server. The framework supports the full Telegram Bot API and is designed to be lightweight and extensible.
Node.js and TypeScript developers who want to build automated Telegram bots for personal use, customer service, notifications, or community management.
Developers choose Telegraf for its excellent TypeScript support, minimal overhead, and flexible middleware system that integrates easily with various hosting platforms and web frameworks.
Modern Telegram Bot Framework for Node.js
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports all features of Telegram Bot API 7.1, ensuring bots can use the latest capabilities like new message types or inline modes.
Built-in comprehensive TypeScript typings provide robust type safety and enhance developer experience, as highlighted in the release notes.
Minimal install size with a middleware-based architecture inspired by Koa, allowing easy customization and extension through plugins.
Seamlessly integrates with AWS Lambda, Firebase, and other platforms, with example code provided for deployment in serverless environments.
Default error handling rethrows and can crash the process, requiring manual setup via bot.catch for production resilience, which adds complexity.
The Koa-inspired middleware system, while powerful, introduces asynchronous patterns that can be challenging for developers new to such architectures.
Setting up webhooks requires manual configuration of domains, ports, and secret tokens, which can be error-prone and less intuitive for beginners.