koishi-plugin-gl-bot 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.
- package/dist/index.js +1 -0
- package/dist/style.css +1 -0
- package/lib/index.d.ts +6 -0
- package/package.json +36 -0
- package/readme.md +5 -0
- package/src/index.ts +20 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveComponent as r,createBlock as a,openBlock as s,withCtx as _,createTextVNode as p}from"vue";const l=(t,e)=>{const o=t.__vccOpts||t;for(const[n,c]of e)o[n]=c;return o},u={};function f(t,e){const o=r("k-layout");return s(),a(o,null,{default:_(()=>[...e[0]||(e[0]=[p("扩展内容",-1)])]),_:1})}const m=l(u,[["render",f]]),x=t=>{t.page({name:"扩展页面",path:"/custom-page",component:m})};export{x as default};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/lib/index.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "koishi-plugin-gl-bot",
|
|
3
|
+
"description": "GleamSlime Koishi Rebot Plugins",
|
|
4
|
+
"version": "0.0.2",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"typings": "lib/index.d.ts",
|
|
7
|
+
"contributors": [
|
|
8
|
+
"GleamSlime <gleamslime@163.com>"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc -p ."
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"src",
|
|
15
|
+
"lib",
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"keywords": [
|
|
20
|
+
"chatbot",
|
|
21
|
+
"koishi",
|
|
22
|
+
"plugin",
|
|
23
|
+
"gleamslime"
|
|
24
|
+
],
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@koishijs/client": "^5.30.11",
|
|
27
|
+
"typescript": "^5.9.3"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@koishijs/plugin-console": "^5.30.11",
|
|
31
|
+
"koishi": "^4.18.9"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
}
|
|
36
|
+
}
|
package/readme.md
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Context, Schema } from "koishi";
|
|
2
|
+
import { resolve } from "path";
|
|
3
|
+
import {} from "@koishijs/plugin-console";
|
|
4
|
+
|
|
5
|
+
export const name = "gl-bot";
|
|
6
|
+
|
|
7
|
+
export interface Config {}
|
|
8
|
+
|
|
9
|
+
export const Config: Schema<Config> = Schema.object({});
|
|
10
|
+
|
|
11
|
+
export function apply(ctx: Context) {
|
|
12
|
+
ctx.inject(["console"], (ctx) => {
|
|
13
|
+
ctx.on("message", (session) => {
|
|
14
|
+
console.log(session.content);
|
|
15
|
+
if (session.content === "天王盖地虎") {
|
|
16
|
+
session.send("宝塔镇河妖");
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|