Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. go-tg

go-tg

MITGov0.18.0

A Go client library for the Telegram Bot API with a full-featured framework for building complex bots.

Visit WebsiteGitHubGitHub
136 stars10 forks0 contributors

What is go-tg?

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.

Target Audience

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.

Value Proposition

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.

Overview

🤖 Go client library for accessing Telegram Bot API, with batteries for building complex bots included.

Use Cases

Best For

  • Building complex Telegram bots requiring structured routing, filters, and middleware.
  • Developing bots that need to handle high load with native webhook reply support.
  • Creating bots with interactive inline keyboards using type-safe, structured callback data.
  • Implementing bots that require fluent, reusable builders for formatted messages (HTML/MarkdownV2) and keyboards.
  • Writing bots that need to manage chat-specific state across updates with a built-in session manager.
  • Projects that benefit from a clean separation between the low-level Telegram API client and the high-level bot framework.

Not Ideal For

  • Projects requiring guaranteed backward compatibility and zero breaking changes, as go-tg is pre-v1.0.0 with no stability promise.
  • Simple bot scripts or one-off automations where advanced routing, middleware, and type-safe callbacks add unnecessary complexity.
  • Teams needing built-in database integrations or ORM support without additional third-party setup.

Pros & Cons

Pros

Generated API Bindings

Automatically generates types and methods from the official Bot API documentation, ensuring full coverage and reducing manual maintenance for API updates.

Type-Safe Callback Data

Provides structured callback data with automatic encoding/decoding via tgb.CallbackDataFilter, eliminating string parsing errors and enhancing safety for inline keyboards.

Fluent Builder APIs

Offers fluent builders for parse modes (HTML/MarkdownV2), keyboards, and messages, improving code readability and enabling reuse across send/edit operations.

Dual Update Modes

Natively supports both polling and webhooks, including webhook reply for high-load scenarios, as highlighted in the features for scalable bot deployment.

Cons

Beta Status Risks

The library is pre-v1.0.0 with no backward compatibility guarantee, posing maintenance risks and potential breaking changes for production projects.

Complex Initial Setup

Advanced features like routing, filters, and session management require grasping multiple abstractions, which can steepen the learning curve beyond basic usage.

Limited Third-Party Ecosystem

Compared to older libraries like telebot, go-tg has fewer community extensions and plugins, often necessitating custom development for integrations.

Frequently Asked Questions

Quick Stats

Stars136
Forks10
Contributors0
Open Issues1
Last commit3 days ago
CreatedSince 2022

Tags

#go-library#bot-framework#telegram-bot-api#file-upload#golang#type-safe#go#api-bindings#middleware#session-management#webhook

Built With

G
Go

Links & Resources

Website

Included in

Go169.1k
Auto-fetched 17 hours ago

Related Projects

telegram-bot-apitelegram-bot-api

Golang bindings for the Telegram Bot API

Stars6,415
Forks996
Last commit1 year ago
GoGo

Telebot is a Telegram bot framework in Go.

Stars4,634
Forks525
Last commit1 month ago
WaybackWayback

An archiving tool with an IM-style interface that prioritizes privacy and accessibility, integrated with various archival services including Internet Archive, archive.today, Ghostarchive, IPFS, Telegraph, and file systems.

Stars2,220
Forks86
Last commit2 days ago
botbot

Telegram Bot API Go framework

Stars1,782
Forks160
Last commit24 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub