Fácil de usar
grammY hace crear bots de Telegram tan simple que ya sabes como hacerlo.
grammY hace crear bots de Telegram tan simple que ya sabes como hacerlo.
grammY es abierto y puede extenderse con plugins para adaptarse a tus necesidades.
grammY te tiene cubierto cuando tu bot se vuelve popular y el tráfico se incrementa.
Bots están escritos en Type
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.41.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! 🎉