node-karin 0.3.3 → 0.3.4
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.
|
@@ -45,9 +45,8 @@ export class MessageHandler extends EventHandler {
|
|
|
45
45
|
if (app.event && !this.filtEvent(app.event)) { continue }
|
|
46
46
|
/** 正则匹配 */
|
|
47
47
|
for (const v of app.rule) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (v.reg.test(this.e.msg)) {
|
|
48
|
+
const reg = v.reg
|
|
49
|
+
if (reg.test(this.e.msg)) {
|
|
51
50
|
/** 检查黑白名单插件 */
|
|
52
51
|
if ('GroupCD' in this.config && !review.PluginEnable(app, this.config)) { continue }
|
|
53
52
|
/** 判断子事件 */
|
package/lib/types/plugin.d.ts
CHANGED
package/lib/utils/button.js
CHANGED
package/lib/utils/handler.d.ts
CHANGED
|
@@ -28,8 +28,9 @@ export declare const handler: {
|
|
|
28
28
|
* @param key 事件键
|
|
29
29
|
* @param args 自定义参数 一般用来传递e之类的
|
|
30
30
|
*/
|
|
31
|
-
call(key: string, args
|
|
32
|
-
|
|
31
|
+
call(key: string, args: {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
e?: import("../index.js").KarinMessage | undefined;
|
|
33
34
|
}): Promise<any>;
|
|
34
35
|
/**
|
|
35
36
|
* 检查是否存在指定键的事件处理器
|
package/lib/utils/handler.js
CHANGED
|
@@ -65,7 +65,7 @@ export const handler = new (class EventHandler {
|
|
|
65
65
|
* @param key 事件键
|
|
66
66
|
* @param args 自定义参数 一般用来传递e之类的
|
|
67
67
|
*/
|
|
68
|
-
async call (key, args
|
|
68
|
+
async call (key, args) {
|
|
69
69
|
let res
|
|
70
70
|
for (const v of loader.handlerIds[key] || []) {
|
|
71
71
|
const info = loader.PluginList[v.index]
|