feat: clear_dynamic_type类型可以多选(#42)

This commit is contained in:
shanmiteko 2021-10-07 12:44:33 +08:00
parent 1c8e5915d9
commit b5fdb2d247
3 changed files with 11 additions and 3 deletions

View File

@ -68,7 +68,11 @@ async function clear() {
for (const [index, dyinfo] of allModifyDynamicResArray.entries()) {
log.info('清理动态', `${page + 1}页中的第${index + 1}个动态`)
const { type, dynamic_id, createtime } = dyinfo || {};
if (type === clear_dynamic_type) {
if (typeof type !== 'undefined'
&& clear_dynamic_type instanceof Array
? clear_dynamic_type.includes(type)
: clear_dynamic_type === type
) {
const
{ origin_uid } = dyinfo,
days_ago = (Now - createtime) / 86400;

View File

@ -256,8 +256,12 @@ module.exports = Object.freeze({
* | 番剧 | `512` |
* | 活动 | `2048` |
* | 专栏 | `64` |
*
* @example
* 1
* [1,2,4]
*/
clear_dynamic_type: 1
clear_dynamic_type: [1]
},
/**

View File

@ -1,6 +1,6 @@
{
"name": "lottery-auto-script",
"version": "2.2.2",
"version": "2.2.3",
"description": "自动参与B站动态抽奖",
"main": "main.js",
"scripts": {