From ed25095ba32b5bee82cebe956a3a923ebc7397e3 Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Tue, 2 Aug 2022 21:29:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=A8=E9=83=A8=E7=AD=BE?= =?UTF-8?q?=E5=88=B0=E6=97=A0=E6=96=87=E4=BB=B6=E6=8B=A6=E6=88=AA=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sign.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/sign.js b/apps/sign.js index 1942ee6..e014591 100644 --- a/apps/sign.js +++ b/apps/sign.js @@ -12,7 +12,6 @@ import { } from '../components/Changelog.js'; import gsCfg from '../model/gsCfg.js'; import fs from "fs"; - export const rule = { mysSign: { reg: "^#*(米游社|mys|社区)(原神|崩坏3|崩坏2|未定事件簿|大别野|崩坏星穹铁道|绝区零|全部)签到$", @@ -48,7 +47,7 @@ const RETRY_OPTIONS = { minTimeout: 5000, maxTimeout: 10000 }; - +let YamlDataUrl = `${_path}/plugins/xiaoyao-cvs-plugin/data/yaml`; export async function sign(e) { let { skuid, @@ -368,6 +367,11 @@ export async function signlist(e) { let msg = e.msg.replace(/#|全部签到/g, "") e.reply(`开始执行${msg}签到中,请勿重复执行`); if (msg == "米游币") { + if(!fs.existsSync(YamlDataUrl)){ + Data.createDir("", YamlDataUrl, false); + e.reply("未读取到可签到文件") + return true; + } ismysbool=true; await allMysSign() } else {