koishi-plugin-checkgal 1.3.4 → 1.3.5

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/commands.js +2 -2
  2. package/package.json +1 -1
package/lib/commands.js CHANGED
@@ -34,7 +34,7 @@ function apply(ctx, config) {
34
34
  for (const game of results) {
35
35
  const imageBuffer = await ctx.touchgal.downloadAndConvertImage(game.banner);
36
36
  if (imageBuffer) {
37
- await session.send((0, koishi_1.h)('image', { src: imageBuffer, mime: 'image/jpeg' }));
37
+ await session.send(koishi_1.h.image(imageBuffer, 'image/jpeg'));
38
38
  }
39
39
  }
40
40
  });
@@ -66,7 +66,7 @@ function apply(ctx, config) {
66
66
  const imageBuffer = gameInfo ? await ctx.touchgal.downloadAndConvertImage(gameInfo.banner) : null;
67
67
  // 对于单条消息,直接发送 Buffer 是最高效的
68
68
  if (imageBuffer) {
69
- await session.send((0, koishi_1.h)('image', { src: imageBuffer, mime: 'image/jpeg' }));
69
+ await session.send(koishi_1.h.image(imageBuffer, 'image/jpeg'));
70
70
  }
71
71
  const header = [
72
72
  gameTitle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-checkgal",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "个人测试请勿使用",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",