An idiomatic, concurrent Go library for the Telegram Bot API with built-in rate limiting and per-chat state isolation.
Echotron is an idiomatic, concurrent library for the Telegram Bot API written in Go. It solves the complexity of managing concurrency, rate limiting, and per-chat state by providing a battle-tested dispatcher pattern and built-in rate limiters out of the box. Developers can focus on bot logic instead of low-level synchronization primitives.
Go developers building production-grade Telegram bots who need robust concurrency, per-chat state isolation, and compliance with Telegram's rate limits without manual implementation.
Echotron offers a unique combination of per-chat state isolation, built-in dual-level rate limiting, and functional state machines in a lightweight library with minimal dependencies. Unlike other libraries, it provides a correct concurrency model by default while remaining unopinionated and allowing developers to use as much or as little of its features as needed.
An elegant and concurrent library for the Telegram bot API in Go.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The Dispatcher automatically maintains isolated bot instances per chat, each with its own goroutine, preventing any chat from blocking another and scoping state naturally without locks.
Dual-level rate limiting with sensible defaults mirrors Telegram's limits, ensuring compliance without configuration and using a shared HTTP client per token for efficiency.
Multi-step conversations can be modeled as self-referential function types, enabling allocation-free state transitions without external dependencies, as shown in the FSM examples.
Methods map 1-to-1 to the Telegram Bot API with type-safe options and enums, ensuring no invented abstractions sit between developers and the official documentation.
As a library, it lacks built-in command routing, middleware, or other framework conveniences, requiring manual implementation for common bot patterns like command parsing.
Compared to more established alternatives like go-telegram-bot-api, Echotron has fewer community extensions, plugins, or integration tools available.
The functional state machine approach using self-referential functions may have a learning curve for developers accustomed to traditional state enums or switch statements.