Quickstart
Build and run your first Telegram bot in minutes.
Core Concepts
Understand the Bot, Context, handlers, and middleware.
Guides
Step-by-step guides for commands, keyboards, files, and more.
API Reference
Full reference for every type, method, and event constant.
What is Telebot?
Telebot is a bot framework for the Telegram Bot API written in Go. Rather than providing a thin 1:1 wrapper over the API, Telebot focuses on developer ergonomics and performance — giving you a clean routing system, composable middleware, and transparent file handling out of the box.go.mod
Minimal example
main.go
Key features
Command routing
Route
/commands, text patterns, and all Telegram update types through a single Handle() API.Middleware
Chain middleware globally, per-group, or per-handler. Includes Logger, AutoRespond, Whitelist, and Recover out of the box.
Transparent File API
Send files from disk or URL. Telebot automatically uploads on first send and reuses the Telegram FileID on subsequent sends.
Keyboards
Build reply and inline keyboards with a fluent markup builder. Buttons act as routing endpoints.
Inline mode
Handle inline queries and respond with typed result objects for photos, articles, GIFs, and more.
Layout system
Define bot configuration, keyboards, and locales in YAML. Switch user locale at runtime.
Installation
Telebot requires Go 1.16 or later.