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

Function showMsg

jd_cfd_loop.js:359–379  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357}
358
359function 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
381function TotalBean() {
382 return new Promise(async resolve => {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected