From 693cfde1f0f4475fce0a1ff318a42e23578ce0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=AF=E8=BE=BE=E9=B8=AD?= Date: Tue, 25 Mar 2025 15:41:10 +0800 Subject: [PATCH] Update bot.js --- bot.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bot.js b/bot.js index 85427ae..228d424 100755 --- a/bot.js +++ b/bot.js @@ -34,7 +34,7 @@ for (nodePath of nodeList) { } } if (bot.BOT_PROXY) { - if (env.BOT_PROXY.toLowerCase().includes("socks")) { + if (bot.BOT_PROXY.toLowerCase().includes("socks")) { var agent = new SocksProxyAgent(bot.BOT_PROXY.toLowerCase()); request.agent = agent } @@ -54,7 +54,6 @@ dir.forEach(async function(item, index) { } } }); -// !(async () => { const bots = new TelegramBot(bot.BOT_TOKEN, { polling: true, @@ -110,8 +109,14 @@ dir.forEach(async function(item, index) { command.stdout.on('data', (data) => { console.log(`stdout: ${data}`); if (data.includes("即将运行")) { - console.log(`正在运行: ${filename} -custom ${tt[2]}`) - sm(chatId, `正在运行: ${filename} -custom ${tt[2]}`, '', 3456) + if (tt[2] == 'start') { + console.log(`正在运行: ${filename}`) + sm(chatId, `正在运行: ${filename}`, '', 3456) + } + else { + console.log(`正在运行: ${filename} -custom ${tt[2]}`) + sm(chatId, `正在运行: ${filename} -custom ${tt[2]}`, '', 3456) + } } }); }