alemonjs 1.0.21 → 1.0.22

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/core/apps.js CHANGED
@@ -24,7 +24,7 @@ export function getAppName(url) {
24
24
  * @returns
25
25
  */
26
26
  export function createApps(url) {
27
- return createApp(getAppPath(url));
27
+ return createApp(getAppName(url));
28
28
  }
29
29
  /**
30
30
  * 创建应用对象
@@ -21,6 +21,9 @@ let mergedRegex;
21
21
  * @returns
22
22
  */
23
23
  export function getPluginHelp(AppName) {
24
+ const c = getAppProCoinfg('regex');
25
+ if (c === false)
26
+ return {};
24
27
  const dir = getAppProCoinfg('route');
25
28
  const basePath = join(process.cwd(), dir, `${AppName}.json`);
26
29
  return JSON.parse(readFileSync(basePath, 'utf8'));
@@ -29,6 +32,9 @@ export function getPluginHelp(AppName) {
29
32
  * 创建机器人帮助
30
33
  */
31
34
  function createPluginHelp() {
35
+ const c = getAppProCoinfg('regex');
36
+ if (c === false)
37
+ return;
32
38
  // 存在app才创建
33
39
  if (Object.values(plugins).length != 0) {
34
40
  // 同时key不能是空数组
@@ -163,6 +163,9 @@ export async function defineAlemonConfig(Options) {
163
163
  */
164
164
  if (Options?.login && Options?.app?.init !== false) {
165
165
  const app = createApp(Options?.app?.name ?? 'bot');
166
+ if (Options?.app?.regJSon?.create === false) {
167
+ setAppProCoinfg('regex', Options?.app?.regJSon?.create);
168
+ }
166
169
  if (Options?.app?.regJSon?.address) {
167
170
  setAppProCoinfg('route', Options?.app?.regJSon?.address);
168
171
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alemonjs",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "阿柠檬框架",
5
5
  "author": "ningmengchongshui",
6
6
  "license": "GPL-2.0",
@@ -35,7 +35,7 @@ export interface AlemonOptions {
35
35
  * 是否生成
36
36
  * defaukt true
37
37
  */
38
- create?: boolean;
38
+ create?: undefined | false;
39
39
  /**
40
40
  * 生成地址
41
41
  * defaukt /publick/defset