diff --git a/lib/core/monitor.js b/lib/core/monitor.js index a979331..7ae7b05 100644 --- a/lib/core/monitor.js +++ b/lib/core/monitor.js @@ -263,7 +263,16 @@ class Monitor extends Searcher { /** 所有抽奖信息 */ let alllotteryinfo = []; const - { check_if_duplicated, save_lottery_info_to_file, set_lottery_info_url, disable_reserve_lottery, reserve_lottery_wait, sneaktower, key_words, model, chatmodel, chat: chats, relay: relays, block_dynamic_type, max_create_time, is_imitator, only_followed, at_users, blockword, blacklist, use_public_blacklist } = config, + { + check_if_duplicated, save_lottery_info_to_file, + set_lottery_info_url, disable_reserve_lottery, + is_not_relay_reserve_lottery, + reserve_lottery_wait, sneaktower, key_words, + model, chatmodel, chat: chats, relay: relays, + block_dynamic_type, max_create_time, is_imitator, + only_followed, at_users, blockword, blacklist, + use_public_blacklist + } = config, now_ts = Date.now() / 1000; /** @@ -433,6 +442,10 @@ class Monitor extends Searcher { } else { await delay(reserve_lottery_wait); await bili.reserve_lottery(reserve_id) + if (is_not_relay_reserve_lottery === true) { + log.info("预约抽奖", "已关闭预约抽奖转发功能"); + return false + } } } } diff --git a/lib/data/config.js b/lib/data/config.js index 2955b6a..74046c2 100644 --- a/lib/data/config.js +++ b/lib/data/config.js @@ -100,6 +100,11 @@ const config = { */ disable_reserve_lottery: false, + /** + * 不转发预约抽奖 + * - 预约抽奖可能与转发抽奖并存 + */ + is_not_relay_reserve_lottery: false, /** * 检查是否重复转发 diff --git a/my_config.example.js b/my_config.example.js index 5920596..0627202 100644 --- a/my_config.example.js +++ b/my_config.example.js @@ -102,6 +102,12 @@ module.exports = Object.freeze({ */ disable_reserve_lottery: false, + /** + * 不转发预约抽奖 + * - 预约抽奖可能与转发抽奖并存 + */ + is_not_relay_reserve_lottery: false, + /** * 检查是否重复转发 * - 不检查 -1