🎈 perf: zzz.tool.panel图片渲染可选

This commit is contained in:
Rrrrrrray 2025-03-15 05:34:13 +08:00
parent ca29580286
commit 121652d431
2 changed files with 6 additions and 5 deletions

View file

@ -147,6 +147,7 @@ export class Panel extends ZZZPlugin {
data = undefined, data = undefined,
needSave = true, needSave = true,
reply = true, reply = true,
needImg = true
} = _data; } = _data;
if (!uid) { if (!uid) {
await this.reply('UID为空'); await this.reply('UID为空');
@ -171,9 +172,9 @@ export class Panel extends ZZZPlugin {
uid, uid,
charData: parsedData, charData: parsedData,
}; };
const image = await this.render('panel/card.html', finalData, { const image = needImg ? await this.render('panel/card.html', finalData, {
retType: 'base64', retType: 'base64',
}); }) : needImg;
if (reply) { if (reply) {
const res = await this.reply(image); const res = await this.reply(image);

View file

@ -134,7 +134,7 @@
"1361": { "1361": {
"sprite_id": "39", "sprite_id": "39",
"name": "「扳机」", "name": "「扳机」",
"full_name": "...", "full_name": "「扳机」",
"en_name": "Trigger" "en_name": "Trigger"
}, },
"1121": { "1121": {
@ -158,7 +158,7 @@
"1351": { "1351": {
"sprite_id": "38", "sprite_id": "38",
"name": "波可娜", "name": "波可娜",
"full_name": "...", "full_name": "波可娜·费雷尼",
"en_name": "Pulchra" "en_name": "Pulchra"
}, },
"1311": { "1311": {