@mra1k3r0/gramora
v0.4.0
Published
Telegram bot framework for TypeScript: a small API for everyday bots, stronger types when you need them, and practical runtime controls.
Downloads
172
Maintainers
Readme
Gramora
TypeScript Telegram bot framework focused on practical APIs, strong typing, and production-safe runtime controls.
Installation
npm install @mra1k3r0/gramora@latestQuick Start
import { Gramora } from "@mra1k3r0/gramora";
const bot = new Gramora({ token: process.env.TELEGRAM_BOT_TOKEN! });
bot.command("start", async (gram) => {
await gram.send("Hello from Gramora");
});
bot.onText(async (gram) => {
await gram.send(`Echo: ${gram.text ?? ""}`);
});
void bot.launch();Why Gramora
- Clean API for common bots (
command,onText,onCallback) - Advanced mode with decorators, modules, and scenes
- Koa-style middleware pipeline (
ctx,next) - Polling and webhook transports with security defaults
- Runtime controls for debug, retries, timeout, webhook validation
Documentation
Full documentation lives in DOCS.md.
Development
npm install
npm run verifyExamples
examples/echo_bot.tsexamples/scene_bot.tsexamples/config_bot.tsexamples/callback_menu_bot.tsexamples/media_advanced_bot.tsexamples/middleware_auth_bot.tsexamples/module_bot.tsexamples/lazy_module_bot.tsexamples/rich_text_bot.ts
Project Notes
Gramora is an evolving framework project inspired by Telegraf. It is not a drop-in replacement, and APIs may evolve with breaking changes.
