koishi-plugin-ggcevo-game 1.0.26 → 1.1.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.js +5 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1482,12 +1482,12 @@ ${achievementList.join("\n")}`;
1482
1482
  const message = [
1483
1483
  `🏟️ 发现受监控玩家在开放大厅中!`,
1484
1484
  `大厅ID: ${lobby.id}`,
1485
- `主机名称: ${lobby.hostName}`,
1486
1485
  `创建时间: ${new Date(lobby.createdAt).toLocaleString("zh-CN", { timeZone: "Asia/Shanghai" })}`,
1487
- `玩家列表:`,
1486
+ `违规玩家列表:`,
1488
1487
  ...matchedSlots.map(
1489
1488
  (slot) => `· ${slot.name}(处罚等级:${punishmentMap.get(slot.handle).level})`
1490
1489
  ),
1490
+ `房主名称: ${lobby.hostName}`,
1491
1491
  `玩家数量: ${lobby.slotsHumansTaken}/${lobby.slotsHumansTotal}`
1492
1492
  ].join("\n");
1493
1493
  await ctx.broadcast(config.groupId, message);
@@ -1544,11 +1544,12 @@ ${achievementList.join("\n")}`;
1544
1544
  const nowChina = convertUTCtoChinaTime(/* @__PURE__ */ new Date());
1545
1545
  const todayStart = new Date(nowChina);
1546
1546
  todayStart.setUTCHours(0, 0, 0, 0);
1547
+ const adjustedTime = new Date(todayStart.getTime() - 8 * 60 * 60 * 1e3);
1547
1548
  if (config.sameOpponentLimit) {
1548
1549
  const sameOpponentCount = await ctx.database.select("ggcevo_pk_logs").where({
1549
1550
  initiator_handle: initiatorHandle,
1550
1551
  target_handle: targetHandle,
1551
- date: { $gte: todayStart }
1552
+ date: { $gte: adjustedTime }
1552
1553
  }).execute((row) => import_koishi.$.count(row.id));
1553
1554
  if (sameOpponentCount > 0) {
1554
1555
  return "您今天已经挑战过该玩家,请明天再试";
@@ -1557,7 +1558,7 @@ ${achievementList.join("\n")}`;
1557
1558
  if (config.maxDailyBeChallenged > 0) {
1558
1559
  const beChallengedCount = await ctx.database.select("ggcevo_pk_logs").where({
1559
1560
  target_handle: targetHandle,
1560
- date: { $gte: todayStart }
1561
+ date: { $gte: adjustedTime }
1561
1562
  }).execute((row) => import_koishi.$.count(row.id));
1562
1563
  if (beChallengedCount >= config.maxDailyBeChallenged) {
1563
1564
  return `该玩家今日已被挑战太多次(最多${config.maxDailyBeChallenged}次)`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ggcevo-game",
3
3
  "description": "星际争霸2游戏大厅咕咕虫-Evo地图专属插件",
4
- "version": "1.0.26",
4
+ "version": "1.1.0",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [