From 700f017b449a02435d6209fa75015b12c7ceb158 Mon Sep 17 00:00:00 2001 From: ctrlcvs <1509167646@qq.com> Date: Fri, 5 Aug 2022 08:30:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=8B=A6=E6=88=AAcookie?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sign.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/sign.js b/apps/sign.js index 029ca78..3f46a43 100644 --- a/apps/sign.js +++ b/apps/sign.js @@ -28,7 +28,7 @@ export const rule = { }, sendyunTime: { reg: "^#*云原神(时间|剩余时间|剩余|还有多久|还剩多少分钟|查询)$", - describe: "米游币全部签到" + describe: "查询当前云原神剩余时间" }, yunSign: { reg: "^#*云原神签到$", @@ -36,7 +36,7 @@ export const rule = { }, yuntoken:{ reg: "^(.*)ct(.*)$", - describe: "云原神签到" + describe: "云原神签到token获取" }, cookiesDocHelp: { reg: "^#*(米游社|cookies|米游币)帮助$", @@ -150,7 +150,7 @@ export async function mysSign(e) { post = post.post; // 2.1 BBS read post let resObj = await promiseRetry((retry, number) => { - // Bot.logger.info(`读取帖子: [${post.subject}] 尝试次数: ${number}`); + Bot.logger.mark(`读取帖子: [${post.subject}] 尝试次数: ${number}`); return miHoYoApi.forumPostDetail(post['post_id']).catch((e) => { Bot.logger.error(`${forum.name} 读取帖子失败: [${e.message}] 尝试次数: ${number}`); return retry(e); @@ -160,21 +160,20 @@ export async function mysSign(e) { await utils.randomSleepAsync(); // 2.2 BBS vote post resObj = await promiseRetry((retry, number) => { - // Bot.logger.info(`点赞帖子: [${post.subject}] 尝试次数: ${number}`); + Bot.logger.mark(`点赞帖子: [${post.subject}] 尝试次数: ${number}`); return miHoYoApi.forumPostVote(post['post_id']).catch((e) => { Bot.logger.error(`${forum.name} 点赞帖子失败: [${e.message}] 尝试次数: ${number}`); return retry(e); }); }, RETRY_OPTIONS); - - // Bot.logger.info(`${forum.name} [${post.subject}] 点赞成功 [${resObj.message}]`); + Bot.logger.mark(`${forum.name} [${post.subject}] 点赞成功 [${resObj.message}]`); await utils.randomSleepAsync(); } // 2.3 BBS share post let sharePost = postList[0].post; resObj = await promiseRetry((retry, number) => { - // Bot.logger.info(`分享帖子: [${sharePost.subject}] 尝试次数: ${number}`); + Bot.logger.mark(`分享帖子: [${sharePost.subject}] 尝试次数: ${number}`); return miHoYoApi.forumPostShare(sharePost['post_id']).catch((e) => { Bot.logger.error(`${forum.name} 分享帖子失败: [${e.message}] 尝试次数: ${number}`); return retry(e); @@ -422,7 +421,9 @@ export async function sendyunTime(e){ return; } export async function yuntoken(e){ - console.log(e) + if(e.msg.includes("ltoken")||e.msg.includes("_MHYUUID")){ //防止拦截米社cookie + return false; + } if (["ct","si","devId"].includes(e.msg)) { e.reply(`格式支持\nai=*;ci=*;oi=*;ct=***********;si=**************;bi=***********;devId=***********`) return false;