易用
grammY 使创建 Telegram Bot 变得如此简单!
grammY 使创建 Telegram Bot 变得如此简单!
grammY 是开放的,通过插件让它完全适合你的需要。
grammY 在你的 bot 拥有较多流量时提供可靠的帮助.
bot 是用 Type
npm install grammy 并粘贴以下代码:
import { Bot } from "grammy";
const bot = new Bot(""); // <-- 把你的 bot token 放在 "" 之间 (https://t.me/BotFather)
// 用"你好!"来回复任意信息
bot.on("message", (ctx) => ctx.reply("你好!"));
bot.start();const { Bot } = require("grammy");
const bot = new Bot(""); // <-- 把你的 bot token 放在 "" 之间 (https://t.me/BotFather)
// 用"你好!"来回复任意信息
bot.on("message", (ctx) => ctx.reply("你好!"));
bot.start();import { Bot } from "https://deno.land/x/grammy@v1.41.1/mod.ts";
const bot = new Bot(""); // <-- 把你的 bot token 放在 "" 之间 (https://t.me/BotFather)
// 用"你好!"来回复任意信息
bot.on("message", (ctx) => ctx.reply("你好!"));
bot.start();运行成功! 🎉