修复报错

This commit is contained in:
Le-niao 2022-07-15 16:52:22 +08:00
parent b5435630b6
commit 7b8d94ca38
3 changed files with 8 additions and 7 deletions

View File

@ -144,7 +144,8 @@ class Cfg {
}
change_qq () {
logger.info('修复qq或密码请手动重启')
if(process.argv.includes('login')) return
logger.info('修改qq或密码请手动重启')
}
}

View File

@ -514,21 +514,21 @@ class PluginsLoader {
/** 判断黑白名单 */
checkBlack (e) {
let cfg = cfg.getOther()
let other = cfg.getOther()
/** 黑名单qq */
if (cfg.blackQQ && cfg.blackQQ.includes(Number(e.user_id))) {
if (other.blackQQ && other.blackQQ.includes(Number(e.user_id))) {
return false
}
if (e.isGroup) {
/** 白名单群 */
if (cfg.whiteGroup) {
if (cfg.whiteGroup.includes(Number(e.group_id))) return true
if (other.whiteGroup) {
if (other.whiteGroup.includes(Number(e.group_id))) return true
return false
}
/** 黑名单群 */
if (cfg.blackGroup && cfg.whiteGroup.includes(Number(e.group_id))) {
if (other.blackGroup && other.whiteGroup.includes(Number(e.group_id))) {
return false
}
}

View File

@ -1,6 +1,6 @@
/** 导入plugin */
import plugin from '../../../lib/plugins/plugin.js'
import GachaData from '../model/GachaData.js'
import GachaData from '../model/gachaData.js'
import fs from 'node:fs'
import lodash from 'lodash'
import puppeteer from '../../../lib/puppeteer/puppeteer.js'