| 1553 | } |
| 1554 | |
| 1555 | function showMsg() { |
| 1556 | return new Promise(async (resolve) => { |
| 1557 | if ($.result.length) { |
| 1558 | if ($.notifyTime) { |
| 1559 | const notifyTimes = $.notifyTime.split(",").map((x) => x.split(":")); |
| 1560 | const now = $.time("HH:mm").split(":"); |
| 1561 | console.log(`\n${JSON.stringify(notifyTimes)}`); |
| 1562 | console.log(`\n${JSON.stringify(now)}`); |
| 1563 | if ( notifyTimes.some((x) => x[0] === now[0] && (!x[1] || x[1] === now[1])) ) { |
| 1564 | $.msg($.name, "", `${$.result.join("\n")}`); |
| 1565 | } |
| 1566 | } else { |
| 1567 | $.msg($.name, "", `${$.result.join("\n")}`); |
| 1568 | } |
| 1569 | |
| 1570 | if ($.isNode() && process.env.CFD_NOTIFY_CONTROL) |
| 1571 | await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${$.result.join("\n")}`); |
| 1572 | } |
| 1573 | resolve(); |
| 1574 | }); |
| 1575 | } |
| 1576 | |
| 1577 | function readShareCode() { |
| 1578 | return new Promise(async resolve => { |