Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
snagovskiy authored Nov 13, 2024
1 parent 3592eb4 commit d26d704
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,13 @@ if (!token) throw new Error("BOT_TOKEN не установлен");

const bot = new Bot(token);

import express from "express";

const app = express(); // или то, что вы используете
app.use(express.json()); // спарсите тело JSON запроса

bot.command(
"start",
(ctx) => ctx.reply("Добро пожаловать! Запущен и работаю..."),
);
bot.command("ping", (ctx) => ctx.reply(`Понг! ${new Date()}`));

const handleUpdate = webhookCallback(bot, "std/http");
app.use(webhookCallback(bot, "express"));

Deno.serve(async (req) => {
try {
Expand Down

0 comments on commit d26d704

Please sign in to comment.