| 357 | } |
| 358 | |
| 359 | function showMsg() { |
| 360 | return new Promise(async (resolve) => { |
| 361 | if ($.result.length) { |
| 362 | if ($.notifyTime) { |
| 363 | const notifyTimes = $.notifyTime.split(",").map((x) => x.split(":")); |
| 364 | const now = $.time("HH:mm").split(":"); |
| 365 | console.log(`\n${JSON.stringify(notifyTimes)}`); |
| 366 | console.log(`\n${JSON.stringify(now)}`); |
| 367 | if ( notifyTimes.some((x) => x[0] === now[0] && (!x[1] || x[1] === now[1])) ) { |
| 368 | $.msg($.name, "", `${$.result.join("\n")}`); |
| 369 | } |
| 370 | } else { |
| 371 | $.msg($.name, "", `${$.result.join("\n")}`); |
| 372 | } |
| 373 | |
| 374 | if ($.isNode() && process.env.CFD_NOTIFY_CONTROL) |
| 375 | await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${$.result.join("\n")}`); |
| 376 | } |
| 377 | resolve(); |
| 378 | }); |
| 379 | } |
| 380 | |
| 381 | function TotalBean() { |
| 382 | return new Promise(async resolve => { |