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.
- TypeScript + Bun: Fast runtime with type safety.
- Modular structure: Commands, Actions, Conversations.
- Useful middlewares: hydrate, emoji, parse-mode, sessions.
- Ready to run: Single
bun startscript.
- Install Bun: https://bun.sh
- Install deps:
bun install
- Configure env: Create a
.envin the project rootBOT_TOKEN=your_telegram_bot_token
- Run:
bun start
.
├── 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- Coded by: https://github.com/uo1428
If this template helps, please leave a star ⭐