From 0cbacd6ddfb0c6ba80659df827404e9a86a6fa1b Mon Sep 17 00:00:00 2001 From: shanmite Date: Thu, 23 Dec 2021 14:54:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A8=E9=80=81=E6=90=BA=E5=B8=A6?= =?UTF-8?q?=E5=B8=90=E5=8F=B7=E7=BC=96=E5=8F=B7(#98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/check.js | 9 +++++---- main.js | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/check.js b/lib/check.js index b6fb351..0aa6d0d 100644 --- a/lib/check.js +++ b/lib/check.js @@ -6,8 +6,9 @@ const bili = require('./net/bili') /** * 是否中奖 + * @param {number} num */ -async function isMe() { +async function isMe(num) { let desp = ''; const { notice_key_words, update_session_wait, get_session_wait, check_session_pages } = config, @@ -23,7 +24,7 @@ async function isMe() { desp += '----------------------------------------------------------------\n\n' desp += `发生时间: ${new Date(at_time * 1000).toLocaleString()}\n\n` desp += `用户: ${up_uname}\n\n` - desp += `在${business}中@了你(${global_var.get("myUID")})\n\n` + desp += `在${business}中@了你(https://space.bilibili.com/${global_var.get("myUID")})\n\n` desp += `原内容为: ${source_content}\n\n` desp += `[直达链接](${url})\n\n` desp += '----------------------------------------------------------------\n\n' @@ -46,7 +47,7 @@ async function isMe() { desp += '----------------------------------------------------------------\n\n' desp += `发生时间: ${new Date(timestamp * 1000).toLocaleString()}\n\n` desp += `用户: ${sender_uid}\n\n` - desp += `私信你(${global_var.get("myUID")})说:\n${content}\n\n` + desp += `私信你(https://space.bilibili.com/${global_var.get("myUID")})说:\n${content}\n\n` desp += `[直达链接](https://message.bilibili.com/#/whisper/mid${sender_uid})\n\n` desp += '----------------------------------------------------------------\n\n' } @@ -75,7 +76,7 @@ async function isMe() { if (desp) { desp += '中奖了别忘给脚本(https://github.com/shanmiteko/LotteryAutoScript)点一个Star哦, 赞助一两块也不是不可以‍‍‍_(:з」∠)_\n\n' log.info('可能中奖了', desp); - await sendNotify('可能中奖了', desp); + await sendNotify(`帐号${num}可能中奖了`, desp); } else { log.info('中奖检测', "暂未中奖"); } diff --git a/main.js b/main.js index 86523ca..8937f92 100644 --- a/main.js +++ b/main.js @@ -65,7 +65,7 @@ async function main() { case 'check': log.info('中奖检测', '检查是否中奖'); loop_wait = check_loop_wait; - await isMe(); + await isMe(NUMBER); break; case 'clear': if (CLEAR) {