From f3438233a7f6293287ff5ba1321bbd4068af11cc Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Mon, 29 Aug 2022 00:09:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=8E=9F=E7=A5=9E=E7=AD=BE?= =?UTF-8?q?=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sign.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/apps/sign.js b/apps/sign.js index c8144eb..e973190 100644 --- a/apps/sign.js +++ b/apps/sign.js @@ -25,7 +25,7 @@ export const rule = { describe: "米币查询" }, sign: { - reg: "^#*(原神|崩坏3|崩坏2|未定事件簿)签到$", + reg: "^#*(崩坏3|崩坏2|未定事件簿)签到$", describe: "米社规则签到" }, signlist: { @@ -40,6 +40,10 @@ export const rule = { reg: "^#*云原神签到$", describe: "云原神签到" }, + delSign:{ + reg: "^#*删除(我的)*(stoken|云原神)$", + describe: "删除云原神、stoken数据" + }, yunAllSign: { reg: "^#云原神全部签到$", describe: "云原神全部签到" @@ -90,7 +94,7 @@ export async function sign(e) { let ForumData = await getDataList(msg); e.reply(`开始尝试${msg}签到预计${msg=='全部'?"60":"5-10"}秒~`) for (let forum of ForumData) { - if (!(["原神","崩坏3", "崩坏2", "未定事件簿"].includes(forum.name))) { + if (!(["崩坏3", "崩坏2", "未定事件簿"].includes(forum.name))) { continue; } resultMessage += `**${forum.name}**\n` @@ -293,6 +297,7 @@ async function cookie(e) { return false; } let stokens=miHoYoApi.getStoken(e.user_id) + console.log(stokens) if (Object.keys(stokens).length>0) { return true; } @@ -576,3 +581,12 @@ export async function yunHelp(e){ const yunDoc=async function(){ return await gsCfg.getfileYaml(`${_path}/plugins/xiaoyao-cvs-plugin/config/`, "config").yunDoc } +export async function delSign(e){ + let msg=e.msg.replace(/#|删除|我的/g,""); + let url=msg=="云原神"?`${yunpath}`:`${YamlDataUrl}`; + console.log(e.uid) + if(await gsCfg.delSytk(url,e.user_id)){ + e.reply(`删除${msg}数据成功~\n期待您的下次使用`) + } + return true; +} \ No newline at end of file