feat: 预约抽奖参与间隔reserve_lottery_wait(#191)

Fixed #191
This commit is contained in:
shanmite 2022-09-11 17:42:23 +08:00
parent 58edd4129c
commit 35fe4481fa
3 changed files with 14 additions and 1 deletions

View File

@ -256,7 +256,7 @@ class Monitor extends Searcher {
/** 所有抽奖信息 */
let alllotteryinfo = [];
const
{ 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,
{ check_if_duplicated, 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,
now_ts = Date.now() / 1000;
/**
@ -411,6 +411,7 @@ class Monitor extends Searcher {
if (hasEnv('NOT_GO_LOTTERY')) {
log.info('NOT_GO_LOTTERY', 'ON');
} else {
await delay(reserve_lottery_wait);
await bili.reserve_lottery(reserve_id)
}
}

View File

@ -221,6 +221,12 @@ const config = {
*/
random_dynamic_wait: 2000,
/**
* - 预约抽奖间隔
* - 单位毫秒
*/
reserve_lottery_wait: 6000,
/**
* - up主粉丝数限制
*/

View File

@ -234,6 +234,12 @@ module.exports = Object.freeze({
*/
random_dynamic_wait: 2000,
/**
* - 预约抽奖间隔
* - 单位毫秒
*/
reserve_lottery_wait: 6000,
/**
* - up主粉丝数限制
*/