diff --git a/CHANGELOG.md b/CHANGELOG.md index fb1b83e..5cb05b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,15 @@ -# 1.1.4 +# 1.1.5 +* 体力模板列表更改为转发形式更具体呈现效果 +* 新增自动签到配置 + *可在`xiaoyao-cvs-plugin/config/config.yaml`中修改是否启用自动签到 +# 1.1.3~1.1.4 * 新增指令`#米游币全部签到` *为所有存在的stoken进行社区米游币签到 * 新增指令`#米社全部签到` *为所有用户进行其余的社区模块签到 * 新增自动签到默认**00:02**开始执行签到 *具体时间修改在`./config/config.yaml` -# 1.1.3 -* 下列功能需要绑定`cookies`来跑,非信任的bot请勿发送cookies -* 修正版本说明避免误导 +* 米游社米游币获取功能需要绑定`cookies`来跑,非信任的bot请勿发送cookies * 实现米游社多模块签到 * 实现米游社米游币获取 * 新增指令`cookies帮助` diff --git a/apps/Note.js b/apps/Note.js index 7d90671..8ed157c 100644 --- a/apps/Note.js +++ b/apps/Note.js @@ -233,7 +233,7 @@ export async function Note(e, { mb = lodash.random(0, path_url.length - 1); } - let urlType = note_file(); + let urlType = note_file("xiaoyao"); if (urlType.length > 0) { urlType = urlType[lodash.random(0, urlType.length - 1)] } @@ -437,18 +437,20 @@ export async function Note_appoint(e) { return true; } -const note_file = function() { +const note_file = function(xiaoyao) { var urlFile = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/Template/`); var urlType = []; for (let val of urlFile) { if (val.includes(".")) continue; urlType.push(val) } - var urlFileOne = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/background_image/`); - for (let val of urlFileOne) { - if (!val.includes(".")) continue; - urlType.push(val) - + if(!xiaoyao){ + var urlFileOne = fs.readdirSync(`./plugins/xiaoyao-cvs-plugin/resources/dailyNote/background_image/`); + for (let val of urlFileOne) { + if (!val.includes(".")) continue; + urlType.push(val) + + } } return urlType; } diff --git a/apps/index.js b/apps/index.js index e807bf1..e43e6ef 100644 --- a/apps/index.js +++ b/apps/index.js @@ -26,12 +26,14 @@ import { rule as signRule, sign, mysSign, - cookiesDocHelp,signlist, + cookiesDocHelp, + signlist, allMysSign, allSign } from "./sign.js" export { - updateRes,signlist, + updateRes, + signlist, updateMiaoPlugin, sign, versionInfo, @@ -89,8 +91,17 @@ task(); async function task() { if (typeof test != "undefined") return; let set = gsCfg.getfileYaml(`${_path}/plugins/xiaoyao-cvs-plugin/config/`, "config") - schedule.scheduleJob(set.mysBbsTime, () => allMysSign()); - schedule.scheduleJob(set.allSignTime, () => allSign()); + schedule.scheduleJob(set.mysBbsTime, function() { + if (set.ismysSign) { + allMysSign() + } + } + ); + schedule.scheduleJob(set.allSignTime, function() { + if (set.isSign) { + allSign() + } + }); } diff --git a/config/config.yaml b/config/config.yaml index f889d3e..e189188 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -4,7 +4,13 @@ cookiesDoc: docs.qq.com/doc/DV2tDY2ltSFdtbU9z isPushSign: false # 米游社米币签到定时任务,Cron表达式,默认00:02开始执行签到 mysBbsTime: 0 2 0 * * ? +# 米币是否自动签到 +ismysSign: true + + # 签到成功是否推送 isAllSign: false # 米游社签到定时任务,Cron表达式,默认00:02开始执行签到 allSignTime: 0 2 0 * * ? +# 是否自动签到 +isSign: true