grammY

grammY

The Telegram Bot Framework.

Get Started Introduction

Easy to Use

grammY makes creating Telegram bots so simple you already know how to do it.

Flexible

grammY is open and can be extended by plugins to make it fit exactly your needs.

Scalable

grammY has you covered when your bot gets popular and the traffic increases.

… easy peasy lemon squeezY.

Quickstart

Bots are written in TypeScriptopen in new window (or JavaScript) and run on various platforms, including Node.jsopen in new window.

npm install grammy and paste the following code:

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@v1.15.3/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-2023 · grammY supports Telegram Bot API 6.6 which was releasedopen in new window on March 9, 2023. (Last highlight: Translated Bot Descriptions)