mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-12 04:30:42 +08:00
Update bot.js
This commit is contained in:
parent
bd76566bd6
commit
693cfde1f0
13
bot.js
13
bot.js
@ -34,7 +34,7 @@ for (nodePath of nodeList) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bot.BOT_PROXY) {
|
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());
|
var agent = new SocksProxyAgent(bot.BOT_PROXY.toLowerCase());
|
||||||
request.agent = agent
|
request.agent = agent
|
||||||
}
|
}
|
||||||
@ -54,7 +54,6 @@ dir.forEach(async function(item, index) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//
|
|
||||||
!(async () => {
|
!(async () => {
|
||||||
const bots = new TelegramBot(bot.BOT_TOKEN, {
|
const bots = new TelegramBot(bot.BOT_TOKEN, {
|
||||||
polling: true,
|
polling: true,
|
||||||
@ -110,8 +109,14 @@ dir.forEach(async function(item, index) {
|
|||||||
command.stdout.on('data', (data) => {
|
command.stdout.on('data', (data) => {
|
||||||
console.log(`stdout: ${data}`);
|
console.log(`stdout: ${data}`);
|
||||||
if (data.includes("即将运行")) {
|
if (data.includes("即将运行")) {
|
||||||
console.log(`正在运行: ${filename} -custom ${tt[2]}`)
|
if (tt[2] == 'start') {
|
||||||
sm(chatId, `正在运行: ${filename} -custom ${tt[2]}`, '', 3456)
|
console.log(`正在运行: ${filename}`)
|
||||||
|
sm(chatId, `正在运行: ${filename}`, '', 3456)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log(`正在运行: ${filename} -custom ${tt[2]}`)
|
||||||
|
sm(chatId, `正在运行: ${filename} -custom ${tt[2]}`, '', 3456)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user