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

Function showMsg

jd_pet.js:442–460  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

440 console.log('投食任务结束...\n');
441}
442async function showMsg() {
443 if ($.isNode() && process.env.PET_NOTIFY_CONTROL) {
444 $.ctrTemp = `${process.env.PET_NOTIFY_CONTROL}` === 'false';
445 } else if ($.getdata('jdPetNotify')) {
446 $.ctrTemp = $.getdata('jdPetNotify') === 'false';
447 } else {
448 $.ctrTemp = `${jdNotify}` === 'false';
449 }
450 // jdNotify = `${notify.petNotifyControl}` === 'false' && `${jdNotify}` === 'false' && $.getdata('jdPetNotify') === 'false';
451 if ($.ctrTemp) {
452 $.msg($.name, subTitle, message, option);
453 if ($.isNode()) {
454 allMessage += `${subTitle}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`
455 // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${subTitle}\n${message}`);
456 }
457 } else {
458 $.log(`\n${message}\n`);
459 }
460}
461function readShareCode() {
462 return new Promise(async resolve => {
463 $.get({url: `http://www.helpu.cf/jdcodes/getcode.php?type=pet&num=${randomCount}`, 'timeout': 10000}, (err, resp, data) => {

Callers 1

jdPetFunction · 0.70

Calls 4

isNodeMethod · 0.45
getdataMethod · 0.45
msgMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected