node-karin 0.11.3 → 0.11.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.
|
@@ -8,13 +8,13 @@ export class EventBaseHandler {
|
|
|
8
8
|
/**
|
|
9
9
|
* - 是否打印群消息日志
|
|
10
10
|
*/
|
|
11
|
-
GroupMsgPrint
|
|
11
|
+
GroupMsgPrint;
|
|
12
12
|
/**
|
|
13
13
|
* 处理事件,加入自定义字段
|
|
14
14
|
*/
|
|
15
15
|
constructor(e) {
|
|
16
16
|
this.e = e;
|
|
17
|
-
this.GroupMsgPrint =
|
|
17
|
+
this.GroupMsgPrint = true;
|
|
18
18
|
/** 加入e.bot */
|
|
19
19
|
!this.e.bot && Object.defineProperty(this.e, 'bot', { value: listener.getBot(this.e.self_id) });
|
|
20
20
|
if (this.e.group_id)
|
|
@@ -248,7 +248,7 @@ export class MessageHandler extends EventBaseHandler {
|
|
|
248
248
|
res = await info.fn.call(app, this.e);
|
|
249
249
|
}
|
|
250
250
|
this.GroupMsgPrint && info.log(this.e.self_id, `${logFnc} ${lodash.truncate(this.e.msg, { length: 80 })} 处理完成 ${logger.green(Date.now() - start + 'ms')}`);
|
|
251
|
-
if (res
|
|
251
|
+
if (res === false)
|
|
252
252
|
continue;
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
@@ -27,6 +27,7 @@ export class NoticeHandler extends EventBaseHandler {
|
|
|
27
27
|
this.deal();
|
|
28
28
|
}
|
|
29
29
|
init() {
|
|
30
|
+
this.raw_message();
|
|
30
31
|
/** 主人 */
|
|
31
32
|
if (config.master.includes(String(this.e.user_id))) {
|
|
32
33
|
this.e.isMaster = true;
|
|
@@ -55,7 +56,6 @@ export class NoticeHandler extends EventBaseHandler {
|
|
|
55
56
|
else {
|
|
56
57
|
logger.bot('info', this.e.self_id, `未知来源通知事件:${JSON.stringify(this.e)}`);
|
|
57
58
|
}
|
|
58
|
-
this.raw_message();
|
|
59
59
|
this.reply();
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
@@ -27,6 +27,7 @@ export class RequestHandler extends EventBaseHandler {
|
|
|
27
27
|
this.deal();
|
|
28
28
|
}
|
|
29
29
|
init() {
|
|
30
|
+
this.raw_message();
|
|
30
31
|
/** 主人 */
|
|
31
32
|
if (config.master.includes(String(this.e.user_id))) {
|
|
32
33
|
this.e.isMaster = true;
|
|
@@ -50,7 +51,6 @@ export class RequestHandler extends EventBaseHandler {
|
|
|
50
51
|
else {
|
|
51
52
|
logger.bot('info', this.e.self_id, `未知来源请求事件:${JSON.stringify(this.e)}`);
|
|
52
53
|
}
|
|
53
|
-
this.raw_message();
|
|
54
54
|
this.reply();
|
|
55
55
|
}
|
|
56
56
|
/**
|