koishi-plugin-suangua223 0.0.1

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/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { Context, Schema } from 'koishi';
2
+ export declare const name = "suangua223";
3
+ export interface Config {
4
+ }
5
+ export declare const Config: Schema<Config>;
6
+ export declare function apply(ctx: Context, config: Config): void;
package/lib/index.js ADDED
@@ -0,0 +1,47 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __export = (target, all) => {
7
+ for (var name2 in all)
8
+ __defProp(target, name2, { get: all[name2], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ Config: () => Config,
24
+ apply: () => apply,
25
+ name: () => name
26
+ });
27
+ module.exports = __toCommonJS(src_exports);
28
+ var import_koishi = require("koishi");
29
+ var name = "suangua223";
30
+ var Config = import_koishi.Schema.object({});
31
+ function getRandomInt(min, max) {
32
+ return Math.floor(Math.random() * (max - min + 1)) + min;
33
+ }
34
+ __name(getRandomInt, "getRandomInt");
35
+ function apply(ctx, config) {
36
+ ctx.command("算卦").action(async ({ session }, ...args) => {
37
+ let random = getRandomInt(1, 64);
38
+ await session.send("您的卦象为" + random);
39
+ });
40
+ }
41
+ __name(apply, "apply");
42
+ // Annotate the CommonJS export names for ESM import in node:
43
+ 0 && (module.exports = {
44
+ Config,
45
+ apply,
46
+ name
47
+ });
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "koishi-plugin-suangua223",
3
+ "description": "算卦插件",
4
+ "version": "0.0.1",
5
+ "main": "lib/index.js",
6
+ "typings": "lib/index.d.ts",
7
+ "files": [
8
+ "lib",
9
+ "dist"
10
+ ],
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "chatbot",
14
+ "koishi",
15
+ "plugin"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc"
19
+ },
20
+ "peerDependencies": {
21
+ "koishi": "^4.18.7"
22
+ }
23
+ }
package/readme.md ADDED
@@ -0,0 +1,5 @@
1
+ # koishi-plugin-suangua223
2
+
3
+ [![npm](https://img.shields.io/npm/v/koishi-plugin-suangua223?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-suangua223)
4
+
5
+ 算卦插件