koishi-plugin-chat-analyse 0.2.4 → 0.2.5

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,7 +1,7 @@
1
1
  import { Context } from 'koishi';
2
2
  declare module 'koishi' {
3
3
  interface Tables {
4
- analyse_msg: {
4
+ analyse_ori_msg: {
5
5
  id: number;
6
6
  channelId: string;
7
7
  userId: string;
package/lib/index.js CHANGED
@@ -37,7 +37,7 @@ var Collector = class _Collector {
37
37
  */
38
38
  constructor(ctx) {
39
39
  this.ctx = ctx;
40
- ctx.model.extend("analyse_msg", {
40
+ ctx.model.extend("analyse_ori_msg", {
41
41
  id: "unsigned",
42
42
  channelId: "string",
43
43
  userId: "string",
@@ -128,7 +128,7 @@ var Collector = class _Collector {
128
128
  const bufferToFlush = this.msgBuffer;
129
129
  this.msgBuffer = [];
130
130
  try {
131
- await this.ctx.database.upsert("analyse_msg", bufferToFlush);
131
+ await this.ctx.database.upsert("analyse_ori_msg", bufferToFlush);
132
132
  } catch (error) {
133
133
  this.ctx.logger.error("数据写入失败:", error);
134
134
  this.msgBuffer.unshift(...bufferToFlush);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-chat-analyse",
3
3
  "description": "聊天记录分析",
4
- "version": "0.2.4",
4
+ "version": "0.2.5",
5
5
  "contributors": [
6
6
  "Yis_Rime <yis_rime@outlook.com>"
7
7
  ],