koishi-plugin-ai-puzzle 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +2 -1
  2. package/package.json +5 -2
package/lib/index.js CHANGED
@@ -1342,7 +1342,8 @@ var GameOrchestrator = class {
1342
1342
  );
1343
1343
  if (image) {
1344
1344
  this.logger.debug("[Game] endGame 图片渲染成功,大小=%d bytes", image.length);
1345
- await session.send(import_koishi.h.image(image, "image/png")).catch((e) => {
1345
+ const base64 = "base64://" + image.toString("base64");
1346
+ await session.send(import_koishi.h.image(base64)).catch((e) => {
1346
1347
  this.logger.warn("[Game] endGame 图片发送失败: %s", e.message);
1347
1348
  });
1348
1349
  } else {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ai-puzzle",
3
3
  "description": "使用AI生成猜谜谜题,支持多模式游戏、模糊匹配、图片渲染",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -31,7 +31,10 @@
31
31
  "zh": "AI猜谜游戏插件,支持AI出题、多模式猜谜、模糊匹配、图片渲染、用户出题"
32
32
  },
33
33
  "service": {
34
- "required": ["database", "puppeteer"],
34
+ "required": [
35
+ "database",
36
+ "puppeteer"
37
+ ],
35
38
  "optional": [],
36
39
  "implements": []
37
40
  }