tinygram โ€” tiny but powerful Telegram bot client for Dart ๐Ÿš€

Logo

Minimalistic yet capable wrapper for sending messages and files via the Telegram Bot API.

Perfect for:

  • bots
  • logging tools
  • dev alerts
  • CI/CD notifications

โœจ Features

  • ๐Ÿ“ฉ Send plain text or MarkdownV2-formatted messages
  • ๐Ÿงพ Pretty-print and send JSON blocks
  • ๐Ÿ“Ž Upload files (images, logs, documents)
  • ๐Ÿ” Fetch updates to discover chat/channel IDs

โš ๏ธ Limitations
โ€ข Message length: up to 4096 characters
โ€ข File size: up to 50 MB (unless your bot is allowed 2 GB)


๐Ÿš€ Getting Started

  1. Open Telegram and start a chat with @BotFather
  2. Create a new bot using /newbot
  3. Set a name and username
  4. Add the bot to a group or channel

๐Ÿ” How to Get Chat ID

Use tinygram.getUpdates() after sending a message in your group:

await bot.getUpdates();

Find the "chat" object in the response and extract the id.

Libraries

tinygram