diff options
| author | Jan Tuomi <jan.tuomi@valuemotive.com> | 2021-11-07 22:13:49 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@valuemotive.com> | 2021-11-07 22:13:49 +0200 |
| commit | 7991ad93470cf42b9c4c96477fc920bbb8899eee (patch) | |
| tree | 2e066c5ffd4895f2bafede1f92cb1cdc08557b4d /src/tg.ts | |
| parent | 2c5c47e3c5343419a6efa618b9d6549394da2e9f (diff) | |
Prepare for move to DO
Diffstat (limited to 'src/tg.ts')
| -rw-r--r-- | src/tg.ts | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |
