metowolf / BilibiliHelper

:taco: B 站自动领瓜子、直播挂机脚本,!!! 非 B 站后台源码 !!!
Other
953 stars 210 forks source link

请问如何改变跳过概率和跳过时间? #97

Closed allenfengjr closed 4 years ago

allenfengjr commented 4 years ago

如题,在init()里面修改,好像没什么作用,.env里也没有这些参数,请问应该在哪里修改?

LynMoe commented 4 years ago

参见 https://github.com/metowolf/BilibiliHelper/blob/master/modules/guard.js

allenfengjr commented 4 years ago

参见 https://github.com/metowolf/BilibiliHelper/blob/master/modules/guard.js

config.js如下 require('dotenv').config()

const Conf = require('conf') const config = new Conf({ cwd: ${__dirname}/../, configName: '.config', fileExtension: '', })

module.exports = config

但是没找到dotenv这个文件,只有在dotenv文件夹中找到了一些相关的......之前也没学过JavaScript,不太了解。 最后我用修改guard.js中if (Math.random() 100 >= guardPercent) 将100修改或者取消if即可即可;另一种做法是修改init.js 中 if (config.get('version') !== package.version) 取消if也可以。但都感觉不太正规......