mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
feat: 新增设置disable_reserve_lottery
是否不参与预约抽奖
This commit is contained in:
parent
03e24b9b84
commit
607b2d7055
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -69,6 +69,11 @@ const config = {
|
||||
*/
|
||||
chatmodel: '01',
|
||||
|
||||
/**
|
||||
* 不参与预约抽奖
|
||||
*/
|
||||
disable_reserve_lottery: false,
|
||||
|
||||
/**
|
||||
* 检查是否重复转发
|
||||
* - 不检查 -1
|
||||
|
||||
@ -84,6 +84,11 @@ module.exports = Object.freeze({
|
||||
*/
|
||||
chatmodel: '01',
|
||||
|
||||
/**
|
||||
* 不参与预约抽奖
|
||||
*/
|
||||
disable_reserve_lottery: false,
|
||||
|
||||
/**
|
||||
* 检查是否重复转发
|
||||
* - 不检查 -1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user