koishi-plugin-suangua223 0.0.2 → 0.0.4

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 +3 -4
  2. package/package.json +6 -1
package/lib/index.js CHANGED
@@ -37,7 +37,7 @@ __export(src_exports, {
37
37
  module.exports = __toCommonJS(src_exports);
38
38
  var import_koishi = require("koishi");
39
39
  var import_fs = __toESM(require("fs"));
40
- var imagePath = "./images/photo.png";
40
+ var imagePath = "./images/1.png";
41
41
  var imageBuffer = import_fs.default.readFileSync(imagePath);
42
42
  var name = "suangua223";
43
43
  var Config = import_koishi.Schema.object({});
@@ -46,10 +46,9 @@ function getRandomInt(min, max) {
46
46
  }
47
47
  __name(getRandomInt, "getRandomInt");
48
48
  function apply(ctx, config) {
49
- ctx.command("算卦").action(async ({ session }, ...args) => {
49
+ ctx.command("测试").action(async ({ session }, ...args) => {
50
50
  let random = getRandomInt(1, 64);
51
- await session.send("您的卦象为" + random);
52
- await session.send((0, import_koishi.h)("img", { src: imageBuffer }));
51
+ await session.send(import_koishi.h.image(imageBuffer, "image/png"));
53
52
  });
54
53
  }
55
54
  __name(apply, "apply");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-suangua223",
3
3
  "description": "算卦插件",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -17,6 +17,11 @@
17
17
  "scripts": {
18
18
  "build": "tsc"
19
19
  },
20
+ "service": {
21
+ "required": [
22
+ "fs"
23
+ ]
24
+ },
20
25
  "peerDependencies": {
21
26
  "koishi": "^4.18.7"
22
27
  }