node-karin 0.12.23 → 0.12.24
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import lodash from 'lodash';
|
|
1
2
|
import { listener, pluginLoader } from '../../core/index.js';
|
|
2
3
|
import { review } from './review.js';
|
|
3
4
|
import { segment, common, logger, config } from '../../utils/index.js';
|
|
@@ -151,7 +152,8 @@ export class EventBaseHandler {
|
|
|
151
152
|
message.unshift(segment.reply(this.e.message_id));
|
|
152
153
|
/** 先发 提升速度 */
|
|
153
154
|
const result = this.e.replyCallback(message, retry_count);
|
|
154
|
-
|
|
155
|
+
/** 限制长度为500 */
|
|
156
|
+
const ReplyLog = lodash.truncate(common.makeMessageLog(message), { length: 500 });
|
|
155
157
|
if (this.e.isGroup) {
|
|
156
158
|
review.GroupMsgPrint(this.e) && logger.bot('info', this.e.self_id, `${logger.green(`Send Group ${this.e.group_id}: `)}${ReplyLog.replace(/\n/g, '\\n')}`);
|
|
157
159
|
}
|