feat: 重命名设置sneaktower(#104)

This commit is contained in:
shanmite 2022-01-16 16:58:49 +08:00
parent 731b8475ec
commit 86e6b7dbc9
3 changed files with 14 additions and 18 deletions

View File

@ -244,7 +244,7 @@ class Monitor extends Searcher {
/** 所有抽奖信息 */ /** 所有抽奖信息 */
let alllotteryinfo = []; let alllotteryinfo = [];
const const
{ check_if_duplicated, set_lottery_info_url, key_words, model, chatmodel, 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, sneaktower, key_words, model, chatmodel, block_dynamic_type, max_create_time, is_imitator, only_followed, at_users, blockword, blacklist, use_public_blacklist } = config,
now_ts = Date.now() / 1000; now_ts = Date.now() / 1000;
/** /**
@ -308,21 +308,17 @@ class Monitor extends Searcher {
log.debug('正在筛选的动态信息', lottery_info); log.debug('正在筛选的动态信息', lottery_info);
switch (lottery_info_type) { if (lottery_info_type.startsWith('sneak') && sneaktower) {
case 'sneaktopic': log.info("筛选动态", `偷塔模式不检查是否已转发(https://t.bilibili.com/${dyid})`)
log.info("筛选动态", `偷塔模式(https://t.bilibili.com/${dyid})`) } else {
break; /* 遇到转发过就退出 */
default: if (
/* 遇到转发过就退出 */ ((!check_if_duplicated || check_if_duplicated === 2) && is_liked)
if ( || ((check_if_duplicated === 1 || check_if_duplicated === 2) && dyids_map.get(dyid))
((!check_if_duplicated || check_if_duplicated === 2) ) {
&& is_liked) log.info("筛选动态", `已转发(https://t.bilibili.com/${dyid})`)
|| ((check_if_duplicated === 1 || check_if_duplicated === 2) return false
&& dyids_map.get(dyid)) }
) {
log.info("筛选动态", `已转发(https://t.bilibili.com/${dyid})`)
return false
}
} }
/* 超过指定时间退出 */ /* 超过指定时间退出 */

View File

@ -82,7 +82,7 @@ const config = {
* 偷塔模式不检查是否重复转发 * 偷塔模式不检查是否重复转发
* * 偷塔模式: 临近开奖时参与抽奖 * * 偷塔模式: 临近开奖时参与抽奖
*/ */
sneaktopic: true, sneaktower: true,
/** /**
* 屏蔽动态类型 * 屏蔽动态类型

View File

@ -96,7 +96,7 @@ module.exports = Object.freeze({
* 偷塔模式不检查是否重复转发 * 偷塔模式不检查是否重复转发
* * 偷塔模式: 临近开奖时参与抽奖 * * 偷塔模式: 临近开奖时参与抽奖
*/ */
sneaktopic: true, sneaktower: true,
/** /**
* 屏蔽动态类型 * 屏蔽动态类型