任务执行异常时 ,增加通知提醒

This commit is contained in:
lxk0301
2021-03-29 10:37:26 +08:00
parent e115936c97
commit 0bb875a6fd
3 changed files with 10 additions and 2 deletions

View File

@ -124,8 +124,10 @@ async function jdFruit() {
}
} catch (e) {
console.log(`任务执行异常,请检查执行日志 ‼️‼️`);
message = `任务执行异常,请检查执行日志 ‼️‼️`;
$.logErr(e);
const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`;
if ($.isNode()) await notify.sendNotify(`${$.name}`, errMsg);
$.msg($.name, '', `京东账号${$.index} ${$.nickName || $.UserName}\n${errMsg}`)
}
await showMsg();
}

View File

@ -141,6 +141,9 @@ async function jdPet() {
}
} catch (e) {
$.logErr(e)
const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`;
if ($.isNode()) await notify.sendNotify(`${$.name}`, errMsg);
$.msg($.name, '', `京东账号${$.index} ${$.nickName || $.UserName}\n${errMsg}`)
}
}
// 收取所有好感度

View File

@ -116,6 +116,9 @@ async function jdPlantBean() {
}
} catch (e) {
$.logErr(e);
const errMsg = `京东账号${$.index} ${$.nickName || $.UserName}\n任务执行异常,请检查执行日志 ‼️‼️`;
if ($.isNode()) await notify.sendNotify(`${$.name}`, errMsg);
$.msg($.name, '', `京东账号${$.index} ${$.nickName || $.UserName}\n${errMsg}`)
}
}
async function doGetReward() {
@ -152,7 +155,7 @@ async function doCultureBean() {
const plantBeanRound = $.plantBeanIndexResult.data.roundList[1]
if (plantBeanRound.roundState === '2') {
//收取营养液
console.log(`开始收取营养液`)
if (plantBeanRound.bubbleInfos && plantBeanRound.bubbleInfos.length) console.log(`开始收取营养液`)
for (let bubbleInfo of plantBeanRound.bubbleInfos) {
console.log(`收取-${bubbleInfo.name}-的营养液`)
await cultureBean(plantBeanRound.roundId, bubbleInfo.nutrientsType)