Update bot.js

This commit is contained in:
可达鸭 2025-03-25 15:41:10 +08:00
parent bd76566bd6
commit 693cfde1f0

9
bot.js
View File

@ -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,9 +109,15 @@ dir.forEach(async function(item, index) {
command.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
if (data.includes("即将运行")) {
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)
}
}
});
}
}