koishi-plugin-minecraft-notifier 1.8.0 → 1.9.0

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.
Files changed (2) hide show
  1. package/lib/index.cjs +7 -1
  2. package/package.json +1 -1
package/lib/index.cjs CHANGED
@@ -1134,10 +1134,16 @@ function apply(ctx, cfg) {
1134
1134
  koaCtx.response.body = await import_node_fs2.promises.readFile(fullHomePagePath);
1135
1135
  });
1136
1136
  ctx.server.get("/Custom.xaml.ini", async (koaCtx) => {
1137
- koaCtx.set("charset=utf-8");
1137
+ koaCtx.set("Content-Type: text/plain; charset=utf-8");
1138
1138
  const articleRecord = (await ctx.database.get("minecraft_article_version", 1))[0];
1139
1139
  koaCtx.response.body = articleRecord.latestVersion;
1140
1140
  });
1141
+ ctx.server.get("/Custom.json", async (koaCtx) => {
1142
+ koaCtx.set("Content-Type", "application/json; charset=utf-8");
1143
+ koaCtx.response.body = JSON.stringify({
1144
+ Title: "Minecraft \u66F4\u65B0\u6458\u8981"
1145
+ });
1146
+ });
1141
1147
  ctx.command("mc.trigger", "\u624B\u52A8\u89E6\u53D1 AI \u66F4\u65B0\u65E5\u5FD7\u603B\u7ED3\u751F\u6210", {
1142
1148
  authority: 4
1143
1149
  }).action(async () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-minecraft-notifier",
3
3
  "description": "A Minecraft new version notification plugin, also featuring a PCL homepage.",
4
- "version": "1.8.0",
4
+ "version": "1.9.0",
5
5
  "main": "lib/index.cjs",
6
6
  "typings": "lib/index.d.ts",
7
7
  "type": "module",