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.
- package/lib/Collector.d.ts +1 -1
- package/lib/index.js +2 -2
- package/package.json +1 -1
package/lib/Collector.d.ts
CHANGED
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("
|
|
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("
|
|
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);
|