koishi-plugin-node-async-bot-all 2.23.0 → 2.24.1

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/fun.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Context } from "koishi";
2
- import { APINews, APIUserInfo } from "./commands";
2
+ import { APINews, APIUserInfo } from "./commands.ts";
3
+ import { JavaStatusResponse } from 'minecraft-server-util';
3
4
  export type HttpResponse<T> = {
4
5
  success: true;
5
6
  data: T;
@@ -38,4 +39,12 @@ export declare function request<T = any>(url: string, options?: RequestInit, tim
38
39
  export declare function readUserCardFile(userInfo: APIUserInfo): Promise<string>;
39
40
  export declare function readUserMsgFile(userName: string, userAvatar: string, msg: string): Promise<string>;
40
41
  export declare function queryA2S(host: string, log: any): Promise<serverInfo>;
41
- export declare function readNewsFile(info: APINews): Promise<string>;
42
+ export declare function readNewsFile(info: APINews, log: any): Promise<string[]>;
43
+ export declare function translateAPI(log: any, text: string): Promise<string>;
44
+ export declare function slpInfo(log: any, host: string, port: number, timeout?: number): Promise<{
45
+ success: true;
46
+ data: JavaStatusResponse;
47
+ } | {
48
+ success: false;
49
+ data: string;
50
+ }>;
package/lib/index.js CHANGED
@@ -34,7 +34,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
34
34
  // src/locales/zh-CN.yml
35
35
  var require_zh_CN = __commonJS({
36
36
  "src/locales/zh-CN.yml"(exports2, module2) {
37
- module2.exports = { commands: { cxgame: { description: "查询服务器当前人数。", messages: { msg: "{time}{list}\n进服指南请在群公告中查看。", list: "【MC 服务器 {count}】\n➣ {version}:{players}\n➣ 玩家列表:{list}\n➣ 备注:{note}", listNoPlayer: "【MC 服务器 {count}】\n➣ {version}:{players}\n➣ 备注:{note}", listFailed: "【MC 服务器 {count}】\n➣ 查询失败:{data}\n➣ 请稍后重试。\n➣ 备注:{note}", listA2S: "【A2S 服务器 {count}】\n➣ {version}:{players}\n➣ 机器人:{bots}\n➣ 备注:{note}", listFailedA2S: "【A2S 服务器 {count}】\n➣ 查询失败:{data}\n➣ 请稍后重试。\n➣ 备注:{note}", forbidden: "{time}\n此指令不允许在本群使用。", failed: "{time}\n查询失败:{data}", timeout: "请求超时。", timeout2: "响应超时。", fewData: "服务端返回的数据过少。", close: "服务器已关闭。", error: "执行错误。", host: "没有到主机的路由。" } }, status: { description: "查询机器人状态。", messages: { msg: "{time}\n--- 系统状态 ---\n系统名称:{name}\nCPU使用率:{cpu}\n内存使用率:{memory}\n--- 机器人状态 ---\n昨日收/发消息数量:{msgCount}\n机器人版本:{version}\n运行时间:{online}", failed: "{time}\n状态获取失败。" } }, random: { description: "随机数生成器。", usage: "缺少参数时默认生成 0-10000 的随机数。\n使用示例:", examples: "random 1 128 生成1到128范围的随机数", messages: { msg: "{time}\n生成的随机数:{data}" } }, info: { description: "查询机器人信息。", messages: { msg: "{data}", failed: "{time}\n读取信息失败。" } }, rw: { description: "随机名言名句。", messages: { msg: "{time}\n{data}", error: "执行错误。", failed: "{time}\n获取失败({data})。" } }, randomba: { description: "随机BA图。", messages: { msg: "{quote}{image}", wait: "{quote}{time}\n请等待图片上传(可能较慢)。" } }, centerservertest: { description: "查看中心服务器状态。", messages: { msg: "{time}{list}", list: "== {name} ==\n状态:{status}\n存活率:{uptime}\n检测时间:{time}", listFailed: "== {name} ==\n查看失败:{data}", failed: "{time}\n查看失败:{data}" } }, meme: { description: "群友的怪话!", messages: { msg: "{quote}{time}\n{image}\n{title}", failed: "{quote}{time}\n获取失败:{data}", forbidden: "{quote}{time}\n此指令不允许在本群使用。", error: "执行错误。" } }, randomcat: { description: "随机猫猫图。", messages: { msg: "{quote}{image}", wait: "{quote}{time}\n请等待图片上传(可能较慢)。", failed: "{quote}{time}\n获取失败:{data}" } }, getqqinfo: { description: "获取 QQ 号的信息。", messages: { msg: "{quote}{image}", failed: "{quote}{time}\n获取失败:{data}", command: "QQ 号不正确。" } }, msg2img: { description: "引用一个消息并使用此指令,即可将消息转图。", messages: { msg: "{quote}{image}", failed: "{quote}{time}\n获取失败:{data}", null: "未引用任何消息。", matroska: "{quote}禁止套娃!" } }, slnews: { description: "抓取 NorthWood 的 Steam 最新新闻。" } } };
37
+ module2.exports = { noApi: "未指定 API", noop: "无", unknownError: "未知错误。", commands: { cxgame: { description: "查询服务器当前人数。", messages: { msg: "{time}{list}\n进服指南请在群公告中查看。", list: "【MC 服务器 {count}】\n➣ {version}:{players}\n➣ 玩家列表:{list}\n➣ 备注:{note}", listNoPlayer: "【MC 服务器 {count}】\n➣ {version}:{players}\n➣ 备注:{note}", listFailed: "【MC 服务器 {count}】\n➣ 查询失败:{data}\n➣ 请稍后重试。\n➣ 备注:{note}", listA2S: "【A2S 服务器 {count}】\n➣ {version}:{players}\n➣ 机器人:{bots}\n➣ 备注:{note}", listFailedA2S: "【A2S 服务器 {count}】\n➣ 查询失败:{data}\n➣ 请稍后重试。\n➣ 备注:{note}", forbidden: "{time}\n此指令不允许在本群使用。", failed: "{time}\n查询失败:{data}", timeout: "请求超时。", fewData: "服务端返回的数据过少。", close: "服务器已关闭。", host: "没有到主机的路由。" } }, status: { description: "查询机器人状态。", messages: { msg: "{time}\n--- 系统状态 ---\n系统名称:{name}\nCPU使用率:{cpu}\n内存使用率:{memory}\n--- 机器人状态 ---\n昨日收/发消息数量:{msgCount}\n机器人版本:{version}\n运行时间:{online}", failed: "{time}\n状态获取失败。" } }, random: { description: "随机数生成器。", usage: "缺少参数时默认生成 0-10000 的随机数。\n使用示例:", examples: "random 1 128 生成1到128范围的随机数", messages: { msg: "{time}\n生成的随机数:{data}" } }, info: { description: "查询机器人信息。", messages: { msg: "{data}", failed: "{time}\n读取信息失败。" } }, rw: { description: "随机名言名句。", messages: { msg: "{time}\n{data}", failed: "{time}\n获取失败({data})。" } }, randomba: { description: "随机BA图。", messages: { msg: "{quote}{image}", wait: "{quote}{time}\n请等待图片上传(可能较慢)。" } }, centerservertest: { description: "查看中心服务器状态。", messages: { msg: "{time}{list}", list: "== {name} ==\n状态:{status}\n存活率:{uptime}\n检测时间:{time}", listFailed: "== {name} ==\n查看失败:{data}", failed: "{time}\n查看失败:{data}", statusLive: "✅ 正常", statusDie: "❌ 故障", dataFail: "未能获取到此服务器的状态信息。" } }, meme: { description: "群友的怪话!", messages: { msg: "{quote}{time}\n{image}\n{title}", failed: "{quote}{time}\n获取失败:{data}", forbidden: "{quote}{time}\n此指令不允许在本群使用。" } }, randomcat: { description: "随机猫猫图。", messages: { msg: "{quote}{image}", wait: "{quote}{time}\n请等待图片上传(可能较慢)。", failed: "{quote}{time}\n获取失败:{data}" } }, getqqinfo: { description: "获取 QQ 号的信息。", messages: { msg: "{quote}{image}", failed: "{quote}{time}\n获取失败:{data}", command: "QQ 号不正确。" } }, msg2img: { description: "引用一个消息并使用此指令,即可将消息转图。", messages: { msg: "{quote}{image}", failed: "{quote}{time}\n获取失败:{data}", null: "未引用任何消息。", matroska: "{quote}禁止套娃!" } }, slnews: { description: "抓取 NorthWood 的 Steam 最新新闻。" } } };
38
38
  }
39
39
  });
40
40
 
@@ -61,6 +61,8 @@ var import_koishi = require("koishi");
61
61
  var import_steam_server_query = require("steam-server-query");
62
62
  var import_html = __toESM(require("@bbob/html"));
63
63
  var import_preset_html5 = __toESM(require("@bbob/preset-html5"));
64
+ var import_bing_translate_api = require("bing-translate-api");
65
+ var import_minecraft_server_util = require("minecraft-server-util");
64
66
  function getSystemName() {
65
67
  return import_os.default.type() + " " + import_os.default.release();
66
68
  }
@@ -282,20 +284,62 @@ async function queryA2S(host, log) {
282
284
  }
283
285
  }
284
286
  __name(queryA2S, "queryA2S");
285
- async function readNewsFile(info) {
287
+ async function readNewsFile(info, log) {
286
288
  let html;
287
289
  try {
288
290
  const aPath = import_path.default.resolve(__dirname, "..") + import_path.default.sep + "res" + import_path.default.sep + "slNews.html";
289
291
  html = await import_fs.default.promises.readFile(aPath, "utf8");
290
- const content = (0, import_html.default)(info.appnews.newsitems[0].contents, (0, import_preset_html5.default)());
292
+ const content = info.appnews.newsitems[0].contents.replace("[spoiler]", "").replace("[/spoiler]", "").replace(/\r\n/g, "\n").replace(/\n{3,}/g, "\n\n").split("\n\n").map((p) => p.trim()).filter(Boolean);
293
+ const bilingualParagraphs = [];
294
+ for (const paragraph of content) {
295
+ const zh = await translateAPI(log, paragraph);
296
+ bilingualParagraphs.push(
297
+ paragraph,
298
+ zh,
299
+ ""
300
+ // 空行用于分隔段落
301
+ );
302
+ }
303
+ const finalText = bilingualParagraphs.join("<br />").replace(/<br \/>{2,}/g, "<br />");
304
+ const contentHtml = (0, import_html.default)(finalText, (0, import_preset_html5.default)());
291
305
  const date = Number(info.appnews.newsitems[0].date + "000");
292
- html = html.toString().replace("{date}", new Date(date).toLocaleString()).replace("{title}", info.appnews.newsitems[0].title).replace("{content}", content);
306
+ html = html.toString().replace("{date}", new Date(date).toLocaleString()).replace("{title}", info.appnews.newsitems[0].title).replace("{content}", contentHtml);
293
307
  } catch (error) {
294
- html = error.message;
308
+ log.error(error);
309
+ log.error(error.message);
310
+ return [error, error.message];
295
311
  }
296
- return html;
312
+ return [html];
297
313
  }
298
314
  __name(readNewsFile, "readNewsFile");
315
+ async function translateAPI(log, text) {
316
+ const ms = random(0, 0, 250);
317
+ await (0, import_koishi.sleep)(ms);
318
+ await (0, import_bing_translate_api.translate)(text, "en", "zh-Hans").then((result) => {
319
+ text = result?.translation;
320
+ }).catch((err) => {
321
+ log.error(err);
322
+ });
323
+ return text;
324
+ }
325
+ __name(translateAPI, "translateAPI");
326
+ async function slpInfo(log, host, port, timeout) {
327
+ try {
328
+ const info = await (0, import_minecraft_server_util.status)(host, port, { timeout });
329
+ log.info(info);
330
+ return {
331
+ "success": true,
332
+ "data": info
333
+ };
334
+ } catch (error) {
335
+ log.error(error);
336
+ return {
337
+ "success": false,
338
+ "data": error.message
339
+ };
340
+ }
341
+ }
342
+ __name(slpInfo, "slpInfo");
299
343
 
300
344
  // src/commands.ts
301
345
  async function getServer(ctx, session) {
@@ -309,7 +353,7 @@ async function getServer(ctx, session) {
309
353
  if (server == void 0) {
310
354
  msg = {
311
355
  "time": time,
312
- "data": "未指定查询 服务器",
356
+ "data": session.text("noApi"),
313
357
  "success": 2
314
358
  };
315
359
  log.warn("Sent:");
@@ -331,7 +375,7 @@ async function getServer(ctx, session) {
331
375
  "players": info.players,
332
376
  "version": info.version,
333
377
  "bots": info.bots,
334
- "note": note ?? ""
378
+ "note": note ?? session.text("noop")
335
379
  };
336
380
  log.info(`Server ${count}:`);
337
381
  log.info(temp);
@@ -339,9 +383,9 @@ async function getServer(ctx, session) {
339
383
  } else {
340
384
  let err;
341
385
  if (info.error.toString().includes("Timeout reached. Possible reasons: You are being rate limited; Timeout too short; Wrong server host configured")) {
342
- err = "请求超时。";
386
+ err = session.text(".timeout");
343
387
  } else {
344
- err = "未知错误。";
388
+ err = session.text("unknown");
345
389
  }
346
390
  const temp = {
347
391
  "count": count,
@@ -353,14 +397,15 @@ async function getServer(ctx, session) {
353
397
  list = list + "\n" + session.text(".listFailedA2S", temp);
354
398
  }
355
399
  } else {
356
- const response = await request(api, {}, ctx.config.timeout, log);
357
- if (response.success) {
358
- if (response.data.list == null) {
400
+ const host = api.split(":");
401
+ const serverInfo = await slpInfo(log, host[0], Number(host[1]), ctx.config.timeout);
402
+ if (serverInfo.success) {
403
+ if (serverInfo.data.players.sample == null) {
359
404
  const temp = {
360
405
  "count": count,
361
- "players": response.data.players,
362
- "version": response.data.version,
363
- "note": note ?? ""
406
+ "players": serverInfo.data.players.online + "/" + serverInfo.data.players.max,
407
+ "version": serverInfo.data.version.name,
408
+ "note": note ?? session.text("noop")
364
409
  };
365
410
  log.info(`Server ${count}:`);
366
411
  log.info(temp);
@@ -368,32 +413,27 @@ async function getServer(ctx, session) {
368
413
  } else {
369
414
  const temp = {
370
415
  "count": count,
371
- "players": response.data.players,
372
- "version": response.data.version,
373
- "list": response.data.list.join(", "),
374
- "note": note ?? ""
416
+ "players": serverInfo.data.players.online + "/" + serverInfo.data.players.max,
417
+ "version": serverInfo.data.version.name,
418
+ "list": serverInfo.data.players.sample.map((item2) => item2.name).join(", "),
419
+ "note": note ?? session.text("noop")
375
420
  };
376
421
  log.info(`Server ${count}:`);
377
422
  log.info(temp);
378
423
  list = list + "\n" + session.text(".list", temp);
379
424
  }
380
425
  } else {
381
- let err;
382
- if (response.code) {
383
- err = response.isJson ? response.error["data"] : response.error;
384
- if (err.includes("Connection refused")) {
385
- err = session.text(".close");
386
- } else if (err.includes("No route to host")) {
387
- err = session.text(".host");
388
- } else if (err.includes("Connection timed out")) {
389
- err = session.text(".timeout");
390
- } else if (err.includes("Server returned too few data")) {
391
- err = session.text(".fewData");
392
- } else if (err.includes("Server read timed out")) {
393
- err = session.text(".timeout2");
394
- }
395
- } else {
396
- err = response.error.message;
426
+ let err = serverInfo.data;
427
+ if (err.includes("connect ECONNREFUSED") || err.includes("Server is offline or unreachable")) {
428
+ err = session.text(".close");
429
+ } else if (err.includes("connect EHOSTUNREACH")) {
430
+ err = session.text(".host");
431
+ } else if (err.includes("connect ETIMEDOUT")) {
432
+ err = session.text(".timeout");
433
+ } else if (err.includes("Ping payload did not match received payload")) {
434
+ err = session.text(".fewData");
435
+ } else if (err.includes("Expected server to send packet type")) {
436
+ err = session.text(".fewData");
397
437
  }
398
438
  const temp = {
399
439
  "count": count,
@@ -513,7 +553,7 @@ async function getRandomWord(ctx, session) {
513
553
  if (ctx.config.rwAPI == void 0) {
514
554
  msg = {
515
555
  "time": time,
516
- "data": "未指定 API",
556
+ "data": session.text("noApi"),
517
557
  "success": 2
518
558
  };
519
559
  log.warn("Sent:");
@@ -552,7 +592,7 @@ async function getBlueArchive(ctx, session) {
552
592
  log.debug(`Got: {"form":"${session.platform}:${session.event.guild?.id}","user":"${session.event.user?.id}","timestamp":${session.event.timestamp},"messageId":"${session.event.message?.id}"}`);
553
593
  const time = getHongKongTime();
554
594
  if (ctx.config.baAPI == void 0) {
555
- await session.send(session.text(".msg", { "quote": import_koishi2.h.quote(session.messageId), "image": "未指定 API" }));
595
+ await session.send(session.text(".msg", { "quote": import_koishi2.h.quote(session.messageId), "image": session.text("noApi") }));
556
596
  return 1;
557
597
  }
558
598
  const vid = await session.send(session.text(".wait", { "quote": import_koishi2.h.quote(session.messageId), "time": time }));
@@ -560,8 +600,8 @@ async function getBlueArchive(ctx, session) {
560
600
  const link = random(2, ctx.config.baAPI) + `?cacheBuster=${random(1, 1, 2147483647)}`;
561
601
  log.info(`Link: ${link}`);
562
602
  await (0, import_koishi2.sleep)(ms);
563
- const status = await session.send(session.text(".msg", { "quote": import_koishi2.h.quote(session.messageId), "image": import_koishi2.h.image(link) }));
564
- if (!status) await session.send(session.text(".msg", { "quote": import_koishi2.h.quote(session.messageId), "image": import_koishi2.h.image(link) }));
603
+ const status2 = await session.send(session.text(".msg", { "quote": import_koishi2.h.quote(session.messageId), "image": import_koishi2.h.image(link) }));
604
+ if (!status2) await session.send(session.text(".msg", { "quote": import_koishi2.h.quote(session.messageId), "image": import_koishi2.h.image(link) }));
565
605
  await session.bot.deleteMessage(session.event.guild?.id, vid[0]);
566
606
  return 0;
567
607
  }
@@ -588,18 +628,18 @@ async function centerServerTest(ctx, session) {
588
628
  const lastTime = response.data.heartbeatList[server.id].at(-1);
589
629
  if (lastTime) {
590
630
  const uptime24 = (response.data.uptimeList[server.id + "_24"] * 100).toFixed(2) + "%";
591
- const status = lastTime?.status == 1 ? "正常" : "故障";
631
+ const status2 = lastTime?.status == 1 ? session.text(".statusLive") : session.text(".statusDie");
592
632
  const testTime = timeFormatter.format(/* @__PURE__ */ new Date(lastTime?.time.replace(" ", "T") + "Z"));
593
633
  list = list + "\n" + session.text(".list", {
594
634
  "name": server.name,
595
- "status": status,
635
+ "status": status2,
596
636
  "uptime": uptime24,
597
637
  "time": testTime
598
638
  });
599
639
  } else {
600
640
  list = list + "\n" + session.text(".listFailed", {
601
641
  "name": server.name,
602
- "data": "未能获取到此服务器的状态信息。"
642
+ "data": session.text(".dataFail")
603
643
  });
604
644
  }
605
645
  }
@@ -670,8 +710,8 @@ async function getMeme(ctx, session, count) {
670
710
  log.warn("Sent:");
671
711
  log.warn(msg);
672
712
  }
673
- const status = await session.send(session.text(msg["success"], msg));
674
- if (!status) await session.send(session.text(msg["success"], msg));
713
+ const status2 = await session.send(session.text(msg["success"], msg));
714
+ if (!status2) await session.send(session.text(msg["success"], msg));
675
715
  return 0;
676
716
  }
677
717
  __name(getMeme, "getMeme");
@@ -687,8 +727,8 @@ async function getCat(ctx, session) {
687
727
  const response = await request(ctx.config.catAPI, {}, ctx.config.timeout, log);
688
728
  if (response.success) {
689
729
  log.debug(response.data);
690
- const status = await session.send(session.text(".msg", { "quote": import_koishi2.h.quote(session.messageId), "image": import_koishi2.h.image(response.data[0].url) }));
691
- if (!status) await session.send(session.text(".msg", { "quote": import_koishi2.h.quote(session.messageId), "image": import_koishi2.h.image(response.data[0].url) }));
730
+ const status2 = await session.send(session.text(".msg", { "quote": import_koishi2.h.quote(session.messageId), "image": import_koishi2.h.image(response.data[0].url) }));
731
+ if (!status2) await session.send(session.text(".msg", { "quote": import_koishi2.h.quote(session.messageId), "image": import_koishi2.h.image(response.data[0].url) }));
692
732
  log.debug("Sent:");
693
733
  log.debug(response.data[0].url);
694
734
  } else {
@@ -820,15 +860,16 @@ async function getNewsMsg(ctx, type) {
820
860
  log.debug("无新闻");
821
861
  return { success: false, data: "" };
822
862
  }
863
+ const html = await readNewsFile(response.data, log);
864
+ if (html[1]) return { success: false, data: `渲染图片失败` };
823
865
  const page = await ctx.puppeteer.page();
824
- const html = await readNewsFile(response.data);
825
866
  try {
826
867
  await page.setViewport({
827
868
  width: 800,
828
869
  height: 800,
829
870
  deviceScaleFactor: 2
830
871
  });
831
- await page.setContent(html, { waitUntil: "networkidle0" });
872
+ await page.setContent(html[0], { waitUntil: "networkidle0" });
832
873
  const { width, height } = await page.evaluate(() => ({
833
874
  width: document.body.scrollWidth,
834
875
  height: document.body.scrollHeight
@@ -843,7 +884,7 @@ async function getNewsMsg(ctx, type) {
843
884
  if (type == 0) await ctx.database.upsert("botData", [
844
885
  { id: "newsId", data: response.data.appnews.newsitems[0].gid }
845
886
  ]);
846
- return { success: true, data: Buffer.from(image).toString("base64"), msg: "NorthWood 发布了一个新闻(原文英语):" + response.data.appnews.newsitems[0].title };
887
+ return { success: true, data: Buffer.from(image).toString("base64"), msg: "NorthWood 发布了一个新闻(原文+机翻):" + response.data.appnews.newsitems[0].title };
847
888
  } catch (err) {
848
889
  log.error("图片渲染失败:", err);
849
890
  return { success: false, data: "图片渲染失败" };
@@ -857,7 +898,7 @@ async function getNewsMsg(ctx, type) {
857
898
  __name(getNewsMsg, "getNewsMsg");
858
899
 
859
900
  // package.json
860
- var version = "2.23.0";
901
+ var version = "2.24.1";
861
902
 
862
903
  // src/index.ts
863
904
  var inject = ["database", "installer", "puppeteer", "cron"];
@@ -924,11 +965,13 @@ function apply(ctx) {
924
965
  ]);
925
966
  });
926
967
  ctx.command("slnews").action(async () => {
968
+ const log = ctx.logger("slnews");
927
969
  const outMsg = await getNewsMsg(ctx, 1);
928
970
  if (outMsg.success) {
929
971
  return `${outMsg.msg}
930
972
  ${(0, import_koishi3.h)("image", { url: `data:image/jpg;base64,${outMsg.data}` })}`;
931
973
  } else {
974
+ log.warn(outMsg);
932
975
  if (outMsg.data == "") return "无可用新闻";
933
976
  return outMsg.data;
934
977
  }
@@ -960,11 +1003,11 @@ ${(0, import_koishi3.h)("image", { url: `data:image/jpg;base64,${outMsg.data}` }
960
1003
  }
961
1004
  });
962
1005
  ctx.command("status").alias("stats").alias("状态").action(async ({ session }) => {
963
- const status = await getStatus(ctx, session);
964
- if (status["success"] == 0) {
965
- return session?.text(".msg", status);
1006
+ const status2 = await getStatus(ctx, session);
1007
+ if (status2["success"] == 0) {
1008
+ return session?.text(".msg", status2);
966
1009
  } else {
967
- return session?.text(".failed", status);
1010
+ return session?.text(".failed", status2);
968
1011
  }
969
1012
  });
970
1013
  ctx.command("random [最小数:number] [最大数:number]").alias("随机数").action(async ({ session }, min, max) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-node-async-bot-all",
3
3
  "description": "NodeAsync Bot插件(自用)",
4
- "version": "2.23.0",
4
+ "version": "2.24.1",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "contributors": [
@@ -35,11 +35,14 @@
35
35
  "@koishijs/plugin-help": "^2.4.5",
36
36
  "@koishijs/plugin-market": "^2.11.8",
37
37
  "koishi": "^4.18.7",
38
- "koishi-plugin-puppeteer": "^3.9.0"
38
+ "koishi-plugin-puppeteer": "^3.9.0",
39
+ "koishi-plugin-cron": "^3.1.0"
39
40
  },
40
41
  "dependencies": {
41
42
  "@bbob/html": "^4.3.1",
42
43
  "@bbob/preset-html5": "^4.3.1",
44
+ "bing-translate-api": "^4.2.0",
45
+ "minecraft-server-util": "^5.4.4",
43
46
  "steam-server-query": "^1.1.3"
44
47
  }
45
48
  }