grammY

grammY

El Framework de Bots para Telegram.

Comenzar Introducción

Fácil de usar

grammY hace crear bots de Telegram tan simple que ya sabes como hacerlo.

Flexible

grammY es abierto y puede extenderse con plugins para adaptarse a tus necesidades.

Escalable

grammY te tiene cubierto cuando tu bot se vuelve popular y el tráfico se incrementa.

… una actualización por delante.

Quickstart

Bots están escritos en TypeScriptopen in new window (o JavaScript) y corren en varias plataformas, incluyendo Node.jsopen in new window.

npm install grammy y copia el siguiente código:

import { Bot } from "grammy";

const bot = new Bot(""); // <-- pon tu token entre los "" (https://t.me/BotFather)

// Responde a cualquier mensaje con "¡Hola a todos!".
bot.on("message", (ctx) => ctx.reply("¡Hola a todos!"));

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

const bot = new Bot(""); // <-- pon tu token entre los "" (https://t.me/BotFather)

// Responde a cualquier mensaje con "¡Hola a todos!".
bot.on("message", (ctx) => ctx.reply("¡Hola a todos!"));

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

const bot = new Bot(""); // <-- pon tu token entre los "" (https://t.me/BotFather)

// Responde a cualquier mensaje con "¡Hola a todos!".
bot.on("message", (ctx) => ctx.reply("¡Hola a todos!"));

bot.start();

¡Funciona! 🎉


© 2021-2023 · grammY es compatible con la API 6.7 de Telegram Bot que fue lanzadaopen in new window el 21 de Abril del 2023. (Último punto destacado: varios nombres de bot, emoji personalizados y mejores consultas en línea)