From 0e780d6f2c29cf651e550fb092c50a5d91334966 Mon Sep 17 00:00:00 2001 From: touchscale <11134128+touchscale_admin@user.noreply.gitee.com> Date: Sun, 25 Jun 2023 02:18:35 +0000 Subject: [PATCH 1/3] update lib/plugins/loader.js. Signed-off-by: touchscale <11134128+touchscale_admin@user.noreply.gitee.com> --- lib/plugins/loader.js | 1 + 1 file changed, 1 insertion(+) 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 From e2dceb047b30af68d6b44c1f9c54389571636ee8 Mon Sep 17 00:00:00 2001 From: touchscale <11134128+touchscale_admin@user.noreply.gitee.com> Date: Sun, 25 Jun 2023 02:19:42 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: touchscale <11134128+touchscale_admin@user.noreply.gitee.com> --- lib/tools/command.js | 1 + 1 file changed, 1 insertion(+) 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, From 97c524ce839387edc81b673715ee8d28c831d1cc Mon Sep 17 00:00:00 2001 From: touchscale <11134128+touchscale_admin@user.noreply.gitee.com> Date: Sun, 25 Jun 2023 02:22:45 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E9=80=82=E9=85=8Dpuppeteer20=E6=9D=A5?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=9B=B4=E5=A4=9A=E6=9E=B6=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: touchscale <11134128+touchscale_admin@user.noreply.gitee.com> --- .puppeteerrc.cjs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .puppeteerrc.cjs diff --git a/.puppeteerrc.cjs b/.puppeteerrc.cjs new file mode 100644 index 0000000..4907718 --- /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, +};