mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
feat: 推送携带帐号编号(#98)
This commit is contained in:
parent
da75c8c17b
commit
0cbacd6ddf
@ -6,8 +6,9 @@ const bili = require('./net/bili')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否中奖
|
* 是否中奖
|
||||||
|
* @param {number} num
|
||||||
*/
|
*/
|
||||||
async function isMe() {
|
async function isMe(num) {
|
||||||
let desp = '';
|
let desp = '';
|
||||||
const
|
const
|
||||||
{ notice_key_words, update_session_wait, get_session_wait, check_session_pages } = config,
|
{ notice_key_words, update_session_wait, get_session_wait, check_session_pages } = config,
|
||||||
@ -23,7 +24,7 @@ async function isMe() {
|
|||||||
desp += '----------------------------------------------------------------\n\n'
|
desp += '----------------------------------------------------------------\n\n'
|
||||||
desp += `发生时间: ${new Date(at_time * 1000).toLocaleString()}\n\n`
|
desp += `发生时间: ${new Date(at_time * 1000).toLocaleString()}\n\n`
|
||||||
desp += `用户: ${up_uname}\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 += `原内容为: ${source_content}\n\n`
|
||||||
desp += `[直达链接](${url})\n\n`
|
desp += `[直达链接](${url})\n\n`
|
||||||
desp += '----------------------------------------------------------------\n\n'
|
desp += '----------------------------------------------------------------\n\n'
|
||||||
@ -46,7 +47,7 @@ async function isMe() {
|
|||||||
desp += '----------------------------------------------------------------\n\n'
|
desp += '----------------------------------------------------------------\n\n'
|
||||||
desp += `发生时间: ${new Date(timestamp * 1000).toLocaleString()}\n\n`
|
desp += `发生时间: ${new Date(timestamp * 1000).toLocaleString()}\n\n`
|
||||||
desp += `用户: ${sender_uid}\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 += `[直达链接](https://message.bilibili.com/#/whisper/mid${sender_uid})\n\n`
|
||||||
desp += '----------------------------------------------------------------\n\n'
|
desp += '----------------------------------------------------------------\n\n'
|
||||||
}
|
}
|
||||||
@ -75,7 +76,7 @@ async function isMe() {
|
|||||||
if (desp) {
|
if (desp) {
|
||||||
desp += '中奖了别忘给脚本(https://github.com/shanmiteko/LotteryAutoScript)点一个Star哦, 赞助一两块也不是不可以_(:з」∠)_\n\n'
|
desp += '中奖了别忘给脚本(https://github.com/shanmiteko/LotteryAutoScript)点一个Star哦, 赞助一两块也不是不可以_(:з」∠)_\n\n'
|
||||||
log.info('可能中奖了', desp);
|
log.info('可能中奖了', desp);
|
||||||
await sendNotify('可能中奖了', desp);
|
await sendNotify(`帐号${num}可能中奖了`, desp);
|
||||||
} else {
|
} else {
|
||||||
log.info('中奖检测', "暂未中奖");
|
log.info('中奖检测', "暂未中奖");
|
||||||
}
|
}
|
||||||
|
|||||||
2
main.js
2
main.js
@ -65,7 +65,7 @@ async function main() {
|
|||||||
case 'check':
|
case 'check':
|
||||||
log.info('中奖检测', '检查是否中奖');
|
log.info('中奖检测', '检查是否中奖');
|
||||||
loop_wait = check_loop_wait;
|
loop_wait = check_loop_wait;
|
||||||
await isMe();
|
await isMe(NUMBER);
|
||||||
break;
|
break;
|
||||||
case 'clear':
|
case 'clear':
|
||||||
if (CLEAR) {
|
if (CLEAR) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user