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.
- package/lib/commands.js +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(
|
|
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(
|
|
69
|
+
await session.send(koishi_1.h.image(imageBuffer, 'image/jpeg'));
|
|
70
70
|
}
|
|
71
71
|
const header = [
|
|
72
72
|
gameTitle,
|