From 40cd273600799610da7e04a0a1bc823dfefe9e83 Mon Sep 17 00:00:00 2001 From: rosendo <42633099+rosendolu@users.noreply.github.com> Date: Sun, 14 Jul 2024 11:19:25 +0800 Subject: [PATCH] fix: --- src/service/telegram.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/service/telegram.js b/src/service/telegram.js index 489589e..d5778dd 100644 --- a/src/service/telegram.js +++ b/src/service/telegram.js @@ -4,11 +4,13 @@ const { getLogger } = require('../common/logger'); const utils = require('../common/utils'); const log = getLogger(); -const bot = new TelegramBot(this.token, { polling: true, webHook: true }); +const token = process.env.TG_TOKEN; +const bot = new TelegramBot(token, { polling: true }); + class Service extends CreateCompose { constructor() { super(); - this.token = process.env.TG_TOKEN; + this.token = token; this.groupId = process.env.TG_GROUP_ID; this.bot = bot; this.init();