wiki search people tested pipeline

This commit is contained in:
Alvis
2026-03-05 11:22:34 +00:00
parent 09a93c661e
commit a30936f120
152 changed files with 47694 additions and 263 deletions

24
sandbox/tgbot/bot.mjs Normal file
View File

@@ -0,0 +1,24 @@
import { Bot } from "grammy";
const BOT_TOKEN = "8428861272:AAH9V_I-ZLk9CsS1-_KnNT77I28WTrzwl4A";
const bot = new Bot(BOT_TOKEN);
bot.on("message", (ctx) => {
const chatId = ctx.chat.id;
const text = ctx.msg.text ?? "(no text)";
const from = ctx.from?.username ?? ctx.from?.first_name ?? "unknown";
console.log(`[MSG] chat_id=${chatId} from=${from} text="${text}"`);
ctx.reply(`Your chat_id is: ${chatId}`);
});
bot.command("start", (ctx) => {
const chatId = ctx.chat.id;
console.log(`[START] chat_id=${chatId}`);
ctx.reply(`Hello! Your chat_id is: ${chatId}\nUse this in Zabbix media settings.`);
});
console.log("Bot starting (polling)...");
bot.start({
onStart: (info) => console.log(`Bot @${info.username} is running. Send a message to get your chat_id.`),
});