diff --git a/lib/clear.js b/lib/clear.js index b623fec..567c2e1 100644 --- a/lib/clear.js +++ b/lib/clear.js @@ -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; diff --git a/my_config.example.js b/my_config.example.js index 09efc54..cf7903a 100644 --- a/my_config.example.js +++ b/my_config.example.js @@ -256,8 +256,12 @@ module.exports = Object.freeze({ * | 番剧 | `512` | * | 活动 | `2048` | * | 专栏 | `64` | + * + * @example + * 1 + * [1,2,4] */ - clear_dynamic_type: 1 + clear_dynamic_type: [1] }, /** diff --git a/package.json b/package.json index c62062f..7dc356e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lottery-auto-script", - "version": "2.2.2", + "version": "2.2.3", "description": "自动参与B站动态抽奖", "main": "main.js", "scripts": {