@alemonjs/qq-bot 2.1.28 → 2.1.30

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/config.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Options as sdkOptions } from './sdk/typing';
2
2
  export declare const platform = "qq-bot";
3
+ export declare const platformFullName = "@alemonjs/qq-bot";
3
4
  export type Options = {
4
5
  master_key?: string[];
5
6
  master_id?: string[];
package/lib/config.js CHANGED
@@ -1,9 +1,12 @@
1
1
  import { getConfigValue, isMaster, createUserHashKey } from 'alemonjs';
2
2
 
3
3
  const platform = 'qq-bot';
4
+ const platformFullName = '@alemonjs/qq-bot';
4
5
  const getQQBotConfig = () => {
5
6
  const value = getConfigValue() || {};
6
- return value[platform] || {};
7
+ const commonValue = value[platform] || {};
8
+ const bagValue = value[platformFullName] || {};
9
+ return { ...commonValue, ...bagValue };
7
10
  };
8
11
  const getIdentity = (UserId) => {
9
12
  const isMasterUser = UserId ? isMaster(UserId, platform) : false;
@@ -17,4 +20,4 @@ const getMaster = (UserId) => {
17
20
  return getIdentity(UserId);
18
21
  };
19
22
 
20
- export { getIdentity, getMaster, getQQBotConfig, platform };
23
+ export { getIdentity, getMaster, getQQBotConfig, platform, platformFullName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alemonjs/qq-bot",
3
- "version": "2.1.28",
3
+ "version": "2.1.30",
4
4
  "description": "阿柠檬qq-bot平台连接",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",
@@ -52,6 +52,11 @@
52
52
  "description": "secret"
53
53
  }
54
54
  ],
55
+ "config-source": {
56
+ "readme": "https://github.com/lemonade-lab/alemonjs/blob/main/packages/qq-bot/README.md",
57
+ "official": "https://bot.q.qq.com/wiki/develop/api-v2/",
58
+ "platform": "https://q.qq.com/"
59
+ },
55
60
  "desktop": {
56
61
  "platform": [
57
62
  {
@@ -87,5 +92,5 @@
87
92
  "type": "git",
88
93
  "url": "https://github.com/lemonade-lab/alemonjs.git"
89
94
  },
90
- "gitHead": "39a919c46a6cbdabb00e898410b5e46cf97f1264"
95
+ "gitHead": "edc7f9c5c75f4f5eaf527bb1dfdb31882bde6d6c"
91
96
  }