Easy-to-use
grammY makes creating Telegram bots so simple you already know how to do it.
Bots are written in Type
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.32.0/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! 🎉