@alemonjs/kook 0.0.2 → 0.0.3

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/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # [https://alemonjs.com/](https://alemonjs.com/)
2
+
3
+ 跨平台开发的事件驱动机器人
4
+
5
+ ## USE
6
+
7
+ - kook
8
+
9
+ ```sh
10
+ yarn add @alemonjs/kook
11
+ ```
12
+
13
+ - alemon.config.yaml
14
+
15
+ ```sh
16
+ kook:
17
+ # 令牌
18
+ token: ''
19
+ ```
20
+
21
+ > 完整的
22
+
23
+ ```sh
24
+ kook:
25
+ # 令牌
26
+ token: ''
27
+ # 主人
28
+ master_id:
29
+ - ''
30
+ ```
31
+
32
+ ## Community
33
+
34
+ QQ Group 806943302
package/lib/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import * as alemonjs from 'alemonjs';
2
-
3
- declare const _default: (_: alemonjs.ConfigType) => typeof global.alemonjs;
1
+ declare const _default: () => typeof global.alemonjs;
4
2
 
5
3
  export { _default as default };
package/lib/index.js CHANGED
@@ -1,7 +1,11 @@
1
- import { defineBot, Text, At, OnProcessor, useParse } from 'alemonjs';
1
+ import { defineBot, getConfig, Text, At, OnProcessor, useParse } from 'alemonjs';
2
2
  import { KOOKClient } from 'chat-space';
3
3
 
4
- var index = defineBot(config => {
4
+ var index = defineBot(() => {
5
+ const cfg = getConfig();
6
+ const config = cfg.value?.kook;
7
+ if (!config)
8
+ return;
5
9
  // 创建客户端
6
10
  const client = new KOOKClient({
7
11
  token: config.token
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@alemonjs/kook",
3
- "version": "0.0.2",
4
- "description": "啊柠檬脚本",
5
- "author": "ningmengchongshui",
3
+ "version": "0.0.3",
4
+ "description": "kook-bot",
5
+ "author": "lemonade",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "main": "lib/index.js",
9
9
  "dependencies": {
10
- "chat-space": "^0.0.3"
10
+ "chat-space": "^0.0.6"
11
11
  },
12
12
  "types": "lib",
13
13
  "exports": {
@@ -16,8 +16,18 @@
16
16
  "types": "./lib/index.d.ts"
17
17
  }
18
18
  },
19
+ "keywords": [
20
+ "alemonjs",
21
+ "kook",
22
+ "bot",
23
+ "chat-bot"
24
+ ],
19
25
  "publishConfig": {
20
- "access": "public",
21
26
  "registry": "https://registry.npmjs.org"
27
+ },
28
+ "bugs": "https://github.com/ningmengchongshui/alemonjs/issues",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/ningmengchongshui/alemonjs.git"
22
32
  }
23
33
  }