@sjtdev/koishi-plugin-dota2tracker 2.5.1 → 2.5.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/changelog.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # 更新日志
2
2
 
3
+ ### [2.5.2](https://github.com/sjtdev/koishi-plugin-dota2tracker/compare/v2.5.1...v2.5.2) (2026-02-20)
4
+
5
+ ### 🐛 Bug 修复
6
+
7
+ * **report/daily:** 修复如果已订阅的玩家中有不公开数据的玩家,获取日报数据失败的问题 ([e293fb6](https://github.com/sjtdev/koishi-plugin-dota2tracker/commit/e293fb62b4120d9db2709c8c073b45225d6e466d))
8
+
9
+ ### 📝 文档
10
+
11
+ * **image/daily:** 修正日报展示图 ([25ad31d](https://github.com/sjtdev/koishi-plugin-dota2tracker/commit/25ad31d193a41920aa940c4c4b188fdb627c1d95))
12
+
3
13
  ### [2.5.1](https://github.com/sjtdev/koishi-plugin-dota2tracker/compare/v2.5.0...v2.5.1) (2026-02-19)
4
14
 
5
15
  ### 🎨 样式
package/lib/index.js CHANGED
@@ -4587,7 +4587,7 @@ var ReportService = class _ReportService extends import_koishi18.Service {
4587
4587
  const users = await this.ctx.dota2tracker.database.getActiveSubscribedPlayers();
4588
4588
  const steamIds = [...new Set(users.map((user) => user.steamId))];
4589
4589
  const data = await this.ctx.dota2tracker.stratzAPI.queryPlayersMatchesForDaily(steamIds, Math.floor(dataStartDate.toSeconds()));
4590
- const allMatchIds = [...new Set(data.players.flatMap((p) => p.matches.map((m) => m.id)))].map((id) => Number(id));
4590
+ const allMatchIds = [...new Set(data.players.flatMap((p) => (p.matches || []).map((m) => m.id)))].map((id) => Number(id));
4591
4591
  const extensions = await this.ctx.dota2tracker.database.getMatchExtension(allMatchIds);
4592
4592
  const getImageUrl = this.ctx.dota2tracker.view.getImageUrl.bind(this.ctx.dota2tracker.view);
4593
4593
  return await _ReportService.formatDailyReportBundles(
@@ -4626,7 +4626,7 @@ var ReportService = class _ReportService extends import_koishi18.Service {
4626
4626
  const impactData = [];
4627
4627
  for (const user of squadUsers) {
4628
4628
  const playerData = squadPlayerData.find((p) => p.steamAccount.id === user.steamId);
4629
- if (!playerData || playerData.matches.length === 0) continue;
4629
+ if (!playerData || !playerData.matches || playerData.matches.length === 0) continue;
4630
4630
  const processed = this.processPlayer(user, playerData, dotaconstants, targetDate, extensions, getImageUrl);
4631
4631
  if (processed.impact.matchCount === 0) continue;
4632
4632
  playerRows.push(processed.row);
@@ -4684,7 +4684,7 @@ var ReportService = class _ReportService extends import_koishi18.Service {
4684
4684
  const currentMatches = /* @__PURE__ */ new Map();
4685
4685
  const previousMatches = /* @__PURE__ */ new Map();
4686
4686
  for (const player of squadPlayerData) {
4687
- for (const match of player.matches) {
4687
+ for (const match of player.matches || []) {
4688
4688
  if (match.startDateTime >= targetSeconds) {
4689
4689
  currentMatches.set(match.id, match);
4690
4690
  } else {
@@ -4732,7 +4732,7 @@ var ReportService = class _ReportService extends import_koishi18.Service {
4732
4732
  let bestMatchId = 0, worstMatchId = 0;
4733
4733
  const playedHeroes = /* @__PURE__ */ new Map();
4734
4734
  let processedMatchCount = 0;
4735
- for (const m of playerData.matches) {
4735
+ for (const m of playerData.matches || []) {
4736
4736
  if (m.startDateTime < targetSeconds) continue;
4737
4737
  processedMatchCount++;
4738
4738
  const self = m.players.find((p) => p.steamAccount?.id === user.steamId);
@@ -4831,7 +4831,7 @@ var ReportService = class _ReportService extends import_koishi18.Service {
4831
4831
  return `${mins}:${secs.toString().padStart(2, "0")}`;
4832
4832
  }
4833
4833
  static buildSpotlightCard(playerData, type, matchId, extensions, dotaconstants, t, getHeroName, getImageUrl) {
4834
- const match = playerData.matches.find((m) => m.id === matchId);
4834
+ const match = (playerData.matches || []).find((m) => m.id === matchId);
4835
4835
  const self = match.players.find((p) => p.steamAccount?.id === playerData.steamAccount.id);
4836
4836
  const extension = extensions.find((e) => Number(e.matchId) === Number(matchId));
4837
4837
  const playerExtension = extension?.data?.players?.find((p) => p.steamAccountId === playerData.steamAccount.id);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sjtdev/koishi-plugin-dota2tracker",
3
3
  "description": "koishi插件-追踪群友的DOTA2对局 | A Koishi plugin to track Dota 2 matches",
4
- "version": "2.5.1",
4
+ "version": "2.5.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [