koishi-plugin-cat-raising 0.1.1 → 0.1.2
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/index.js +5 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -148,8 +148,8 @@ function apply(ctx, config) {
|
|
|
148
148
|
ctx.logger.info(`纯数字信息缺少时间,已忽略: ${messageForChecks.replace(/\s+/g, " ").substring(0, 50)}...`);
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
if (forwardedHistory.some((entry) => entry.
|
|
152
|
-
session.send(
|
|
151
|
+
if (forwardedHistory.some((entry) => entry.roomId === roomId)) {
|
|
152
|
+
session.send(`看到啦看到啦,不要发那么多次嘛~`);
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
let biliInfo = "";
|
|
@@ -189,7 +189,9 @@ function apply(ctx, config) {
|
|
|
189
189
|
const newEntry = {
|
|
190
190
|
originalMessageId: messageId,
|
|
191
191
|
forwardedMessageId,
|
|
192
|
-
originalContent: originalMessageContent
|
|
192
|
+
originalContent: originalMessageContent,
|
|
193
|
+
roomId
|
|
194
|
+
// 新增
|
|
193
195
|
};
|
|
194
196
|
forwardedHistory.push(newEntry);
|
|
195
197
|
if (forwardedHistory.length > HISTORY_SIZE) {
|