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
- const ReplyLog = common.makeMessageLog(message);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "0.12.23",
3
+ "version": "0.12.24",
4
4
  "private": false,
5
5
  "description": "基于 Kritor 进行开发的nodejs机器人框架",
6
6
  "homepage": "https://github.com/KarinJS/Karin",