feat: add setup endpoint to register bot commands and webhook

GET /webhook/setup/:secret registers commands with Telegram
and sets webhook URL in one step.
This commit is contained in:
2026-04-08 23:31:11 +07:00
parent 68b9604598
commit 37c2a01677
4 changed files with 51 additions and 5 deletions

View File

@@ -2,10 +2,12 @@ import { Hono } from "hono";
import { handleTelegramWebhook } from "./bot-commands.js";
import { handleStatuspageWebhook } from "./statuspage-webhook.js";
import { handleQueue } from "./queue-consumer.js";
import { setupBot } from "./bot-setup.js";
const app = new Hono();
app.get("/", (c) => c.text("Claude Status Bot is running"));
app.get("/webhook/setup/:secret", (c) => setupBot(c));
app.post("/webhook/telegram", (c) => handleTelegramWebhook(c));
app.post("/webhook/status/:secret", (c) => handleStatuspageWebhook(c));