From 86785d86f813c04b1ed213a121ec1f7f1e8f8222 Mon Sep 17 00:00:00 2001 From: touchscale <11134128+touchscale_admin@user.noreply.gitee.com> Date: Wed, 28 Jun 2023 20:21:48 +0000 Subject: [PATCH] =?UTF-8?q?!61=20=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6notice=E4=B8=8D=E7=9B=91=E5=90=AC=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E5=90=8C=E6=AD=A5Yunzai-Bot=E7=9A=84PR!86,PR?= =?UTF-8?q?!88=EF=BC=8C=E6=98=9F=E9=93=811.1=E4=B8=8B=E5=8D=8A=E5=8D=A1?= =?UTF-8?q?=E6=B1=A0=E6=9B=B4=E6=96=B0=EF=BC=8Cicqq=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=EF=BC=8C=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=AD=BE=E5=90=8DAPI=E5=9C=B0=E5=9D=80=EF=BC=8C=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE6=E6=9B=BF=E6=8D=A2=E4=B8=BATim=20*=20update=20lib/con?= =?UTF-8?q?fig/qq.js.=20*=20update=20lib/config/init.js.=20*=20update=20co?= =?UTF-8?q?nfig/default=5Fconfig/qq.yaml.=20*=20update=20plugins/genshin/d?= =?UTF-8?q?efSet/pool/12.yaml.=20*=20update=20plugins/genshin/defSet/pool/?= =?UTF-8?q?11.yaml.=20*=20=E5=A2=9E=E5=8A=A0=E7=AD=BE=E5=90=8DAPI=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E9=85=8D=E7=BD=AE=20*=20=E5=8D=87=E7=BA=A7icqq?= =?UTF-8?q?=E7=89=88=E6=9C=AC=20*=20add=20.puppeteerrc.cjs.=20*=20update?= =?UTF-8?q?=20lib/tools/command.js.=20*=20update=20lib/plugins/loader.js.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .puppeteerrc.cjs | 33 +++++++++++++++++++++++++++++ config/default_config/bot.yaml | 3 +++ config/default_config/qq.yaml | 2 +- lib/config/init.js | 2 +- lib/config/qq.js | 4 ++-- lib/plugins/loader.js | 1 + lib/tools/command.js | 1 + package.json | 2 +- plugins/genshin/defSet/pool/11.yaml | 9 ++++++++ plugins/genshin/defSet/pool/12.yaml | 9 ++++++++ 10 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 .puppeteerrc.cjs 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: