mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
fix: 清理动态
This commit is contained in:
parent
583f690040
commit
83dff8ce5c
15
lib/clear.js
15
lib/clear.js
@ -58,19 +58,24 @@ async function clear() {
|
||||
const { type, dynamic_id, createtime } = res;
|
||||
if (type === 1) {
|
||||
const { origin_uid } = res;
|
||||
if ((now - createtime) > 86400 * clear_max_day) {
|
||||
//移除动态
|
||||
if (clear_remove_dynamic)
|
||||
if (clear_remove_all_force
|
||||
|| (now - createtime) > 86400 * clear_max_day) {
|
||||
/* 移除动态 */
|
||||
if (clear_remove_dynamic) {
|
||||
success = await BiliAPI.rmDynamic(dynamic_id)
|
||||
}
|
||||
|
||||
//取消关注
|
||||
/* 取消关注 */
|
||||
if (clear_remove_attention
|
||||
&& (clear_remove_all_force
|
||||
|| (before_separate.indexOf(origin_uid) === -1
|
||||
&& uid_list.indexOf(origin_uid) > -1)))
|
||||
&& uid_list.indexOf(origin_uid) > -1))) {
|
||||
success = await BiliAPI.cancelAttention(origin_uid);
|
||||
}
|
||||
|
||||
/* 延时 */
|
||||
await Base.delay(8e3);
|
||||
|
||||
if (!success) break;
|
||||
} else {
|
||||
before_separate.push(origin_uid)
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
npm i
|
||||
npm run clean
|
||||
npm run clear
|
||||
@ -3,7 +3,7 @@ $host.UI.RawUI.BackgroundColor = "Black"
|
||||
$host.UI.RawUI.WindowTitle = "清理动态"
|
||||
|
||||
npm i
|
||||
npm run clean
|
||||
npm run clear
|
||||
|
||||
# 暂停
|
||||
pause
|
||||
Loading…
Reference in New Issue
Block a user