diff --git a/apps/wiki.js b/apps/wiki.js index 62d34c4c..f648bbc9 100644 --- a/apps/wiki.js +++ b/apps/wiki.js @@ -31,7 +31,7 @@ app.reg({ // #今日素材 today: { - rule: /^#(今日|今天|每日|我的)*(素材|材料|天赋)[ |0-9]*$/, + rule: /^#(今日|今天|每日|我的|明天|明日|周([1-7]|一|二|三|四|五|六|日))*(素材|材料|天赋)[ |0-9]*$/, fn: TodayMaterial.render } }) diff --git a/apps/wiki/TodayMaterial.js b/apps/wiki/TodayMaterial.js index 68343658..44ce9c21 100644 --- a/apps/wiki/TodayMaterial.js +++ b/apps/wiki/TodayMaterial.js @@ -10,7 +10,18 @@ const TodayMaterial = { if (now.hour() < 4) { now = now.add(-1, 'days') } + if (/明天|明日/.test(e.msg)) { + now = now.add(1, 'days') + } let week = now.weekday() + + let weekRet = /周([1-7]|一|二|三|四|五|六|日)/.exec(e.msg) + let weekSel = weekRet?.[1] + if (weekSel) { + week = (weekSel * 1) || ('一二三四五六日'.split('').indexOf(weekSel) + 1) + week = week - 1 + } + if (week === 6) { e.reply('今天周日,全部素材都可以刷哦~') return false