diff --git a/lib/core/monitor.js b/lib/core/monitor.js index 4b9d67d..bc83531 100644 --- a/lib/core/monitor.js +++ b/lib/core/monitor.js @@ -246,7 +246,7 @@ class Monitor extends Searcher { /** 所有抽奖信息 */ let alllotteryinfo = []; const - { check_if_duplicated, set_lottery_info_url, 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, set_lottery_info_url, disable_reserve_lottery, 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; /** @@ -374,11 +374,15 @@ class Monitor extends Searcher { } if (reserve_id) { - log.info("预约抽奖", "开始"); - if (hasEnv('NOT_GO_LOTTERY')) { - log.info('NOT_GO_LOTTERY', 'ON'); + if (disable_reserve_lottery) { + log.info("已关闭预约抽奖功能") } else { - await bili.reserve_lottery(reserve_id) + log.info("预约抽奖", "开始"); + if (hasEnv('NOT_GO_LOTTERY')) { + log.info('NOT_GO_LOTTERY', 'ON'); + } else { + await bili.reserve_lottery(reserve_id) + } } } diff --git a/lib/data/config.js b/lib/data/config.js index 12c5eef..85b3468 100644 --- a/lib/data/config.js +++ b/lib/data/config.js @@ -69,6 +69,11 @@ const config = { */ chatmodel: '01', + /** + * 不参与预约抽奖 + */ + disable_reserve_lottery: false, + /** * 检查是否重复转发 * - 不检查 -1 diff --git a/my_config.example.js b/my_config.example.js index 446c83a..7a038f6 100644 --- a/my_config.example.js +++ b/my_config.example.js @@ -84,6 +84,11 @@ module.exports = Object.freeze({ */ chatmodel: '01', + /** + * 不参与预约抽奖 + */ + disable_reserve_lottery: false, + /** * 检查是否重复转发 * - 不检查 -1