Skip to content

Introduction

Telegram Bot SDK is a TypeScript toolkit for working with the Telegram Bot API. It consists of three packages that can be used independently or together.

What you can do

Call any Bot API method — send messages, upload files, manage chats. You get full autocomplete for method names and parameters, and typed results with a simple ok / error shape. → How to Use Client

Build a bot — define handlers for commands, text messages, and callbacks with a fluent builder API. Run it with long polling (no server needed) or webhooks. → How to Write Bots

Use just the types — 285 types and 166 methods, auto-generated from official Telegram docs. No runtime code, works with any HTTP client. → API Reference

Packages

PackagenpmWhat it does
@effect-ak/tg-bot-clientnpmType-safe client for calling Bot API methods
@effect-ak/tg-botnpmBot framework with handlers, polling, and webhooks
@effect-ak/tg-bot-apinpmTypeScript types for the entire Bot API

The bot framework (@effect-ak/tg-bot) includes the client, so you only need one install if you’re building a bot. Use the client package on its own for simpler use cases like sending notifications or integrating Telegram into an existing app.

Key Features

  • Always Up-to-Date: Types generated from official Telegram API documentation
  • Fully Type-Safe: Complete TypeScript support for all API methods and types
  • Zero Config: Works out of the box with sensible defaults
  • No Webhooks Required: Uses long polling — run anywhere without public URLs