Skip to content

Uo1428/grammy-bunjs-telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grammy.js Telegram Bot Template (Bun + TypeScript)

A minimal, structured template for building Telegram bots with grammy.js on Bun, using TypeScript. Includes modular commands, actions, and conversations out of the box.

Fiverr Discord GitHub Patreon YouTube


Features

  • TypeScript + Bun: Fast runtime with type safety.
  • Modular structure: Commands, Actions, Conversations.
  • Useful middlewares: hydrate, emoji, parse-mode, sessions.
  • Ready to run: Single bun start script.

Quick Start

  1. Install Bun: https://bun.sh
  2. Install deps:
    bun install
  3. Configure env: Create a .env in the project root
    BOT_TOKEN=your_telegram_bot_token
  4. Run:
    bun start

Project Structure

.
├── config/                # Env/config management
├── src/
│  ├── Actions/            # Callback query handlers
│  ├── Commands/           # Bot commands (e.g. /start)
│  ├── Conversations/      # Multi-step flows
│  ├── Database/           # DB entry (placeholder)
│  ├── utils/              # Client loaders, helpers, types
│  └── index.ts            # App entry
├── package.json           # Scripts & deps
└── tsconfig.json          # TS config

Credit

If this template helps, please leave a star ⭐