Skip to content
@gramiojs

GramIO

TypeScript/JavaScript Telegram Bot API Framework for create your bots with convenience!

GramIO

Bot API npm JSR JSR Score

TypeScript/JavaScript Telegram Bot API Framework for create your bots with convenience!

Extensible - Our plugin and hook system is awesome

🛡️ Type-safe - Written in TypeScript with love ❤️

🌐 Multi-runtime - Works on Node.js, Bun and Deno

⚙️ Code-generated - Many parts are code-generated (for example, code-generated and auto-published Telegram Bot API types)

To create your new bot, you just need to write it to the console:

npm create gramio@latest ./bot

and GramIO customize your project the way you want it!

Example

import { Bot } from "gramio";

const bot = new Bot(process.env.BOT_TOKEN as string)
    .command("start", (context) => context.send("Hello!"))
    .onStart(({ info }) => console.log(`✨ Bot ${info.username} was started!`));

bot.start();

For more, please see documentation and get-started guide.

GramIO in action

Example which uses some interesting features.

import { Bot, format, bold, code } from "gramio";
import { findOrRegisterUser } from "./utils";

const bot = new Bot(process.env.BOT_TOKEN as string)
    .derive("message", async () => {
        const user = await findOrRegisterUser();

        return {
            user,
        };
    })
    .on("message", (context) => {
        context.user; // typed

        return context.send(format`
        Hi, ${bold(context.user.name)}! 
        You balance: ${code(context.user.balance)}`);
    });

Pinned Loading

  1. gramio Public

    Powerful, extensible and really type-safe Telegram Bot API framework

    TypeScript 100 2

  2. documentation Public

    GramIO framework documentation

    TypeScript 5 5

  3. types Public

    Code-generated and Auto-published Telegram Bot API types

    TypeScript 8

Repositories

Showing 10 of 25 repositories
  • create-gramio Public

    Scaffolding your GramIO project with the environment with easy!

    TypeScript 4 MIT 0 1 6 Updated Mar 25, 2025
  • init-data Public
    TypeScript 1 MIT 0 0 0 Updated Mar 21, 2025
  • documentation Public

    GramIO framework documentation

    TypeScript 5 5 0 3 Updated Mar 21, 2025
  • wrappergram Public

    Simple and tiny code-generated Telegram Bot API wrapper for TypeScript/JavaScript with file upload support.

    TypeScript 5 MIT 0 0 0 Updated Mar 18, 2025
  • gramio Public

    Powerful, extensible and really type-safe Telegram Bot API framework

    TypeScript 100 MIT 2 0 0 Updated Mar 18, 2025
  • files Public

    Library for uploading files to Telegram and etc with files

    TypeScript 4 MIT 0 0 0 Updated Mar 18, 2025
  • callback-data Public

    Library for easily manage callback-data

    TypeScript 3 MIT 0 0 0 Updated Mar 17, 2025
  • keyboards Public

    Framework-agnostic Telegram bot keyboard builder with many cool features!

    TypeScript 5 MIT 0 0 0 Updated Mar 15, 2025
  • i18n Public

    This plugin provide good way to add internationalization for your bots!

    TypeScript 4 MIT 0 0 0 Updated Feb 23, 2025
  • types Public

    Code-generated and Auto-published Telegram Bot API types

    TypeScript 8 MIT 0 0 0 Updated Feb 13, 2025

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…