From 7991ad93470cf42b9c4c96477fc920bbb8899eee Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sun, 7 Nov 2021 22:13:49 +0200 Subject: Prepare for move to DO --- src/tg.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tg.ts') diff --git a/src/tg.ts b/src/tg.ts index 45c60c7..4850c88 100644 --- a/src/tg.ts +++ b/src/tg.ts @@ -1,12 +1,12 @@ import { Telegraf } from "telegraf"; import config from "./config"; import { addActiveChat, getActiveChats, removeActiveChat } from "./db"; -import { tgMiddleware } from "./middleware"; +import { tgAuth } from "./middleware"; console.log(`Setting up Telegram bot with token ${config.tgBotToken}`); const bot = new Telegraf(config.tgBotToken); -bot.use(tgMiddleware.tgAuth); +bot.use(tgAuth); bot.command("/start", async (ctx) => { await addActiveChat(ctx.chat.id); -- cgit v1.3