A Go client library for the Telegram Bot API with a full-featured framework for building complex bots.
go-tg is a comprehensive Go library for interacting with the Telegram Bot API, providing both a low-level client and a high-level bot framework. It enables developers to build sophisticated Telegram bots with features like webhook/polling support, structured routing, middleware, and type-safe callback data.
Go developers building production-grade Telegram bots who need a type-safe, performant library with a clean separation between the raw API client and the bot framework.
Developers choose go-tg for its separation of concerns, offering a standalone API client and a decoupled bot framework, both designed for performance without runtime reflection overhead. It provides automatically generated API bindings, type-safe callback data, and a comprehensive feature set including fluent builders for messages and keyboards.
🤖 Go client library for accessing Telegram Bot API, with batteries for building complex bots included.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically generates types and methods from the official Bot API documentation, ensuring full coverage and reducing manual maintenance for API updates.
Provides structured callback data with automatic encoding/decoding via tgb.CallbackDataFilter, eliminating string parsing errors and enhancing safety for inline keyboards.
Offers fluent builders for parse modes (HTML/MarkdownV2), keyboards, and messages, improving code readability and enabling reuse across send/edit operations.
Natively supports both polling and webhooks, including webhook reply for high-load scenarios, as highlighted in the features for scalable bot deployment.
The library is pre-v1.0.0 with no backward compatibility guarantee, posing maintenance risks and potential breaking changes for production projects.
Advanced features like routing, filters, and session management require grasping multiple abstractions, which can steepen the learning curve beyond basic usage.
Compared to older libraries like telebot, go-tg has fewer community extensions and plugins, often necessitating custom development for integrations.