diff --git a/.puppeteerrc.cjs b/.puppeteerrc.cjs new file mode 100644 index 0000000..253d90c --- /dev/null +++ b/.puppeteerrc.cjs @@ -0,0 +1,33 @@ +const os = require("os"); +const { existsSync } = require("fs"); +const arch = os.arch(); +let skipDownload = false; +let executablePath; +//win32 存在 Edge 优先选择 +if (process.platform == "win32") { + if ( + existsSync("C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe") + ) { + skipDownload = true; + executablePath = + "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"; + } +} else if (process.platform == "linux") { + //如果arm64架构跳过下载 + if (arch == "arm64" || arch == "aarch64") { + skipDownload = true; + } + //不管什么架构,如果存在配置则跳过下载,且配置路径 + if (existsSync("/usr/bin/chromium")) { + skipDownload = true; + executablePath = "/usr/bin/chromium"; + } +} + +/** + * @type {import("puppeteer").Configuration} + */ +module.exports = { + skipDownload, + executablePath, +}; \ No newline at end of file diff --git a/config/default_config/bot.yaml b/config/default_config/bot.yaml index f02c673..919080f 100644 --- a/config/default_config/bot.yaml +++ b/config/default_config/bot.yaml @@ -21,3 +21,6 @@ proxyAddress: online_msg: true # 上线推送通知的冷却时间 online_msg_exp: 86400 + +# 签名API地址 +sign_api_addr: diff --git a/config/default_config/qq.yaml b/config/default_config/qq.yaml index 2407f95..f291a10 100644 --- a/config/default_config/qq.yaml +++ b/config/default_config/qq.yaml @@ -2,5 +2,5 @@ qq: # 密码,为空则用扫码登录,扫码登录现在仅能在同一ip下进行 pwd: -# 1:安卓手机、 2:aPad 、 3:安卓手表、 4:MacOS 、 5:iPad 、 6:安卓8.8.88 +# 1:安卓手机、 2:aPad 、 3:安卓手表、 4:MacOS 、 5:iPad 、 6:Tim platform: 6 \ No newline at end of file diff --git a/lib/config/init.js b/lib/config/init.js index 6bfeb5d..9e36287 100644 --- a/lib/config/init.js +++ b/lib/config/init.js @@ -31,7 +31,7 @@ async function UpdateTitle() { title += ' iPad' break case 6: - title += ' 安卓8.8.88' + title += ' Tim' break default: } diff --git a/lib/config/qq.js b/lib/config/qq.js index d6b99cd..2a30c70 100644 --- a/lib/config/qq.js +++ b/lib/config/qq.js @@ -33,10 +33,10 @@ export default async function createQQ () { message: '请选择登录端口:', name: 'platform', default: '6', - choices: ['安卓8.8.88', 'iPad', '安卓手机', '安卓手表', 'MacOS', 'aPad'], + choices: ['Tim', 'iPad', '安卓手机', '安卓手表', 'MacOS', 'aPad'], filter: (val) => { switch (val) { - case '安卓8.8.88':return 6 + case 'Tim':return 6 case 'iPad':return 5 case 'MacOS':return 4 case '安卓手机':return 1 diff --git a/lib/plugins/loader.js b/lib/plugins/loader.js index 56f322e..59851e6 100644 --- a/lib/plugins/loader.js +++ b/lib/plugins/loader.js @@ -698,6 +698,7 @@ class PluginsLoader { /** 判断黑白名单 */ checkBlack (e) { let other = cfg.getOther() + let notice = cfg.getNotice() if (e.test) return true diff --git a/lib/tools/command.js b/lib/tools/command.js index 1451294..96ae975 100644 --- a/lib/tools/command.js +++ b/lib/tools/command.js @@ -49,6 +49,7 @@ class Command { group_id: data.group_id || 826198224, group_name: data.group_name || '测试群', user_id: data.user_id, + user_avatar:`https://q1.qlogo.cn/g?b=qq&s=0&nk=${data.user_id}`, anonymous: null, message: [{ type: 'text', text }], raw_message: text, diff --git a/package.json b/package.json index bf21ef4..48fd950 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "chalk": "^5.2.0", "chokidar": "^3.5.3", "https-proxy-agent": "5.0.1", - "icqq": "^0.3.14", + "icqq": "^0.4.7", "image-size": "^1.0.2", "inquirer": "^8.2.5", "lodash": "^4.17.21", diff --git a/plugins/genshin/defSet/pool/11.yaml b/plugins/genshin/defSet/pool/11.yaml index a744629..f4010ac 100644 --- a/plugins/genshin/defSet/pool/11.yaml +++ b/plugins/genshin/defSet/pool/11.yaml @@ -1,3 +1,12 @@ +- from: '2023-06-28 12:00:00' + to: '2023-07-18 14:59:59' + five: + - 罗刹 + four: + - 驭空 + - 佩拉 + - 青雀 + name: 寻索世间 - from: '2023-06-07 11:00:00' to: '2023-06-28 11:59:59' five: diff --git a/plugins/genshin/defSet/pool/12.yaml b/plugins/genshin/defSet/pool/12.yaml index 06448f8..9e466af 100644 --- a/plugins/genshin/defSet/pool/12.yaml +++ b/plugins/genshin/defSet/pool/12.yaml @@ -1,3 +1,12 @@ +- from: '2023-06-28 12:00:00' + to: '2023-07-18 14:59:59' + five: + - 棺的回响 + four: + - 晚安与睡颜 + - 天才们的休憩 + - 舞!舞!舞! + name: 流光定影 - from: '2023-06-07 11:00:00' to: '2023-06-28 11:59:59' five: