mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
parent
24e16ed8bc
commit
09b6db4f8b
@ -10,7 +10,7 @@ const bili = require('./net/bili')
|
|||||||
async function isMe() {
|
async function isMe() {
|
||||||
let desp = '';
|
let desp = '';
|
||||||
const
|
const
|
||||||
{ notice_key_words, update_session_wait, get_session_wait } = config,
|
{ notice_key_words, update_session_wait, get_session_wait, check_session_pages } = config,
|
||||||
UnreadAtNum = await bili.getUnreadAtNum(),
|
UnreadAtNum = await bili.getUnreadAtNum(),
|
||||||
UnreadSessionNum = await bili.getUnreadSessionNum(),
|
UnreadSessionNum = await bili.getUnreadSessionNum(),
|
||||||
{ follow_unread, unfollow_unread } = UnreadSessionNum || { unfollow_unread: 0, follow_unread: 0 };
|
{ follow_unread, unfollow_unread } = UnreadSessionNum || { unfollow_unread: 0, follow_unread: 0 };
|
||||||
@ -34,6 +34,7 @@ async function isMe() {
|
|||||||
const check = async (type) => {
|
const check = async (type) => {
|
||||||
let session_t = '';
|
let session_t = '';
|
||||||
let MySession = await bili.getSessionInfo(type)
|
let MySession = await bili.getSessionInfo(type)
|
||||||
|
log.info("准备检查私信", check_session_pages + "页")
|
||||||
for (const index of infiniteNumber()) {
|
for (const index of infiniteNumber()) {
|
||||||
for (const Session of MySession.data) {
|
for (const Session of MySession.data) {
|
||||||
const { sender_uid, session_ts, timestamp, unread_count, talker_id, msg_seqno } = Session;
|
const { sender_uid, session_ts, timestamp, unread_count, talker_id, msg_seqno } = Session;
|
||||||
@ -53,7 +54,7 @@ async function isMe() {
|
|||||||
await delay(update_session_wait);
|
await delay(update_session_wait);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (MySession.has_more && index < 16) {
|
if (MySession.has_more && index < check_session_pages) {
|
||||||
await delay(get_session_wait);
|
await delay(get_session_wait);
|
||||||
MySession = await bili.getSessionInfo(type, session_t)
|
MySession = await bili.getSessionInfo(type, session_t)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -269,6 +269,11 @@ const config = {
|
|||||||
"中奖|获得|填写|写上|提供|收货地址|支付宝账号|码|大会员"
|
"中奖|获得|填写|写上|提供|收货地址|支付宝账号|码|大会员"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* - 获取私信页数
|
||||||
|
*/
|
||||||
|
check_session_pages: 16,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* - 清理白名单uid或dyid
|
* - 清理白名单uid或dyid
|
||||||
* - 英文逗号分隔 如: 1,2,3
|
* - 英文逗号分隔 如: 1,2,3
|
||||||
|
|||||||
@ -283,6 +283,11 @@ module.exports = Object.freeze({
|
|||||||
"中奖|获得|填写|写上|提供|收货地址|支付宝账号|码|大会员"
|
"中奖|获得|填写|写上|提供|收货地址|支付宝账号|码|大会员"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* - 获取私信页数
|
||||||
|
*/
|
||||||
|
check_session_pages: 16,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* - 清理白名单uid或dyid
|
* - 清理白名单uid或dyid
|
||||||
* - 英文逗号分隔 如: 1,2,3
|
* - 英文逗号分隔 如: 1,2,3
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user