koishi-plugin-booknews 0.0.6 → 0.0.8
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 +3 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -56,7 +56,7 @@ function apply(ctx, config) {
|
|
|
56
56
|
forward: true,
|
|
57
57
|
userId: bot.selfId,
|
|
58
58
|
nickname: item.authorName
|
|
59
|
-
}, pureText);
|
|
59
|
+
}, import_koishi.h.parse(pureText));
|
|
60
60
|
});
|
|
61
61
|
const partNum = Math.floor(i / chunkSize) + 1;
|
|
62
62
|
const totalParts = Math.ceil(newsList.length / chunkSize);
|
|
@@ -86,11 +86,11 @@ function apply(ctx, config) {
|
|
|
86
86
|
authorName: session.username || session.userId,
|
|
87
87
|
timestamp: /* @__PURE__ */ new Date()
|
|
88
88
|
});
|
|
89
|
-
session.send("已收录书讯");
|
|
90
89
|
});
|
|
91
90
|
ctx.cron(config.sendTime, () => sendDailyReport(false));
|
|
92
91
|
ctx.command("sendnews", "手动触发发送今日书讯").option("clear", "-c 发送后清空数据库", { fallback: false }).action(async ({ options }) => {
|
|
93
|
-
|
|
92
|
+
await sendDailyReport(!options.clear);
|
|
93
|
+
ctx.logger("book").info(`日报发送成功`);
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
__name(apply, "apply");
|