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 +1 -1
- package/lib/core/dealmsg.js +6 -0
- package/lib/define/main.js +3 -0
- package/package.json +1 -1
- package/types/define/types.d.ts +1 -1
package/lib/core/apps.js
CHANGED
package/lib/core/dealmsg.js
CHANGED
|
@@ -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不能是空数组
|
package/lib/define/main.js
CHANGED
|
@@ -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