bot api reference

every Telegram Bot API method and type — 185 methods, 400 types, Bot API 10.3 — with a yaebal-specific usage example on every page. generated from packages/types/schema.json, the same single source of truth @yaebal/types and @yaebal/contexts are code-generated from — nothing here is hand-maintained, so it can't drift.

calling a method

every method is typed directly on Api (via the generated BotApiMethods); call stays as the untyped passthrough, and many methods also get a context shortcut:

bot.ts
// every method is a fully typed call on `Api` (params + return type,
// cross-linked to its own reference page) — the client materialises them at runtime:
await bot.api.sendMessage({ chat_id: 123456789, text: "hello!" });

// the untyped passthrough still exists — for brand-new methods the types
// haven't shipped for, or params built dynamically as plain records:
import type { Message } from "@yaebal/types";
await bot.api.call<Message>("sendMessage", { chat_id: 123456789, text: "hello!" });

// ...and/or a context shortcut, wired by @yaebal/contexts:
bot.on("message", (ctx) => ctx.send("hello!"));

Getting updates

methods 4

types 2

Available types

types 236

Available methods

methods 131

Updating messages

methods 19

Stickers

methods 16

types 4

Rich messages

methods 2

types 85

Inline mode

methods 1

types 31

Payments

methods 8

types 25

Telegram Passport

methods 1

types 14

Games

methods 3

types 3