Skip to content

Latest commit

 

History

History

site

layout titleTemplate hero features
home
false
name text taglines image actions
grammY
The Telegram Bot Framework.
think of the whY.
a new era of bot development.
runs faster than you.
have fun making bots.
one update ahead.
can do anything except dishes.
easy peasy lemon squeezY.
billions and billions served.
powered by obsession.
src alt
/images/Y.svg
grammY logo
theme text link
brand
Get Started
./guide/getting-started
theme text link
alt
Documentation
./guide/
icon title details
<lazy-tgs-player class="VPImage" src="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/icons/beach-animation.tgs"><img src="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/icons/beach.svg" alt="beach animation"></lazy-tgs-player>
Easy-to-use
grammY makes creating Telegram bots so simple you already know how to do it.
icon title details
<lazy-tgs-player class="VPImage" src="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/icons/palette-animation.tgs"><img src="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/icons/palette.svg" alt="palette animation"></lazy-tgs-player>
Flexible
grammY is open and can be extended by plugins to make it fit exactly your needs.
icon title details
<lazy-tgs-player class="VPImage" src="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/icons/rocket-animation.tgs"><img src="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/icons/rocket.svg" alt="rocket animation"></lazy-tgs-player>
Scalable
grammY has you covered when your bot gets popular and the traffic increases.

Quickstart

Bots are written in TypeScript (or JavaScript) and run on various platforms, including Node.js.

npm install grammy and paste the following code:

::: code-group

import { Bot } from "grammy";

const bot = new Bot(""); // <-- put your bot token between the "" (https://t.me/BotFather)

// Reply to any message with "Hi there!".
bot.on("message", (ctx) => ctx.reply("Hi there!"));

bot.start();
const { Bot } = require("grammy");

const bot = new Bot(""); // <-- put your bot token between the "" (https://t.me/BotFather)

// Reply to any message with "Hi there!".
bot.on("message", (ctx) => ctx.reply("Hi there!"));

bot.start();
import { Bot } from "https://deno.land/x/grammy/mod.ts";

const bot = new Bot(""); // <-- put your bot token between the "" (https://t.me/BotFather)

// Reply to any message with "Hi there!".
bot.on("message", (ctx) => ctx.reply("Hi there!"));

bot.start();

:::

Works! 🎉


© 2021-2024 · grammY supports Telegram Bot API 7.7 which was released on July 7, 2024. (Last highlight: Payment refunded services messages)