From 0922a90bbae27eabddd8008e33e731537b403872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=8C?= Date: Wed, 8 Nov 2023 20:43:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 10 +++++++++- lib/plugins/plugin.js | 9 +++++++++ lib/plugins/runtime.js | 6 +++++- package.json | 12 ++++++------ 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4d3335..d3c3721 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ +# 3.1.3 + +* 支持协议端:QQBot +* **请注意:** + * 从3.1.3版本开始,原genshin包内的功能会逐步重构,与miao-plugin进行整合,以降低后续游戏版本升级时的维护成本 + * 在整合过程中,可能会移除一些重复或迁移成本较高的功能,以及可能会有功能不稳定情况 + * 如介意,请切换至**v312-backup**分支 + # 3.1.2 -* 支持协议端:QQBot、OPQBot +* 支持协议端:OPQBot * 新增`#绑定用户`命令 * 可将其他QQ绑定至当前用户,以打通多个用户,子用户使用主用户的CK与UID等信息 * 同时也可绑定其他平台的用户,例如频道、微信等。如需链接至其他平台需使用TRSS-Yunzai或Lain-plugin diff --git a/lib/plugins/plugin.js b/lib/plugins/plugin.js index b4874ba..3e738da 100644 --- a/lib/plugins/plugin.js +++ b/lib/plugins/plugin.js @@ -1,3 +1,5 @@ +import { Common } from '#miao' + let stateArr = {} export default class plugin { @@ -116,4 +118,11 @@ export default class plugin { delete stateArr[this.conKey(isGroup)][type] } } + + async renderImg (plugin, tpl, data, cfg) { + return Common.render(plugin, tpl, data, { + ...cfg, + e: this.e + }) + } } diff --git a/lib/plugins/runtime.js b/lib/plugins/runtime.js index 35b4f23..ae912ac 100644 --- a/lib/plugins/runtime.js +++ b/lib/plugins/runtime.js @@ -237,7 +237,11 @@ export default class Runtime { } let ret = true if (base64) { - ret = await this.e.reply(base64) + if (cfg.recallMsg) { + ret = await this.e.reply(base64, false, {}) + } else { + ret = await this.e.reply(base64) + } } return cfg.retType === 'msgId' ? ret : true } diff --git a/package.json b/package.json index f10c4a8..66156c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "trss-yunzai", - "version": "3.1.2", + "version": "3.1.3", "author": "TimeRainStarSky, Yoimiya-Kokomi, Le-niao", "description": "Bot", "main": "app.js", @@ -32,18 +32,18 @@ "node-xlsx": "^0.23.0", "oicq": "link:lib/modules/oicq", "pm2": "^5.3.0", - "puppeteer": "^21.4.1", + "puppeteer": "^21.5.0", "redis": "^4.6.10", - "sequelize": "^6.33.0", + "sequelize": "^6.34.0", "sqlite3": "^5.1.6", "ws": "^8.14.2", - "yaml": "^2.3.3" + "yaml": "^2.3.4" }, "devDependencies": { - "eslint": "^8.52.0", + "eslint": "^8.53.0", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.0", - "eslint-plugin-n": "^16.2.0", + "eslint-plugin-n": "^16.3.0", "eslint-plugin-promise": "^6.1.1" }, "imports": {