MCPcopy Create free account
hub / github.com/Semporia/Scripts / showMsg

Function showMsg

jd_cfd.js:1555–1575  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1553}
1554
1555function 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
1577function readShareCode() {
1578 return new Promise(async resolve => {

Callers 1

jd_cfd.jsFile · 0.70

Calls 4

timeMethod · 0.45
logMethod · 0.45
msgMethod · 0.45
isNodeMethod · 0.45

Tested by

no test coverage detected