@sjtdev/koishi-plugin-dota2tracker 1.1.2-hotfix → 1.1.2-hotfix.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/lib/index.js CHANGED
@@ -1307,7 +1307,6 @@ async function apply(ctx, config) {
1307
1307
  player.heroesPerformanceTop10 = playerExtra.heroesPerformance.slice(0, 10);
1308
1308
  } else
1309
1309
  throw 0;
1310
- console.log(player);
1311
1310
  session.send(await ctx.puppeteer.render(genImageHTML(player, config.template_player, "player" /* Player */)));
1312
1311
  } catch (error) {
1313
1312
  ctx.logger.error(error);
@@ -1348,7 +1347,7 @@ async function apply(ctx, config) {
1348
1347
  session.send("初次使用或版本更新,正在更新英雄技能数据中……");
1349
1348
  let queryRes2 = await query(ALL_ABILITIES_CHINESE_NAME());
1350
1349
  if (queryRes2.status == 200) {
1351
- AbilitiesConstantsCN.data = queryRes2.data.data.constants;
1350
+ AbilitiesConstantsCN = { data: queryRes2.data.data.constants };
1352
1351
  await ctx.database.upsert("dt_constants_abilities_cn", (row) => [
1353
1352
  { id: 1, data: AbilitiesConstantsCN, gameVersionId: queryConstants.gameVersions[0].id, gameVersionName: queryConstants.gameVersions[0].name }
1354
1353
  ]);
@@ -1514,6 +1513,7 @@ KDA:${((player.kills + player.assists) / (player.deaths || 1)).toFixed(2)} [${
1514
1513
  broadMatchMessage += broadPlayerMessage + "\n";
1515
1514
  }
1516
1515
  await ctx.broadcast([`${commingGuild.platform}:${commingGuild.guildId}`], broadMatchMessage + img);
1516
+ ctx.logger.info(`已解析${match.id}并发布于${commingGuild.platform}:${commingGuild.guildId}。`);
1517
1517
  }
1518
1518
  ctx.database.upsert("dt_previous_query_results", (row) => [{ matchId: match.id, data: match, queryTime: /* @__PURE__ */ new Date() }]);
1519
1519
  ctx.database.create("dt_sended_match_id", { matchId: match.id, sendTime: /* @__PURE__ */ new Date() });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sjtdev/koishi-plugin-dota2tracker",
3
3
  "description": "",
4
- "version": "1.1.2-hotfix",
4
+ "version": "1.1.2-hotfix.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
package/readme.md CHANGED
@@ -11,6 +11,7 @@ DOTA2Bot插件-提供自动追踪群友的最新对局的功能(需群友绑
11
11
  在希望推送战报信息的群组使用指令【-订阅本群】,玩家可使用指令【-绑定】来将自身账号与Steam账号绑定,bot会尝试追踪已订阅群组中的绑定玩家的最新对局信息。
12
12
  其他查询功能见下方指令说明。
13
13
  **直接调用help指令可获取更详细的说明,调用【指令 -h】还会有用法示例。(例如:订阅本群 -h)**
14
+ **更新日志见[changelog](changelog.md)
14
15
 
15
16
  ### 指令
16
17
  指令 <必填参数> [可选参数]
@@ -408,7 +408,7 @@
408
408
  <div class="wrapper">
409
409
  <div class="player">
410
410
  <%- `
411
- <div class="avatar"><img src="${player.steamAccount.avatar}" alt="" /></div>
411
+ <div class="avatar"><img src="${player.steamAccount?.avatar}" alt="" /></div>
412
412
  <div class="info">
413
413
  <p class="name">${player.steamAccount.name}${player.guildMember ? ` <span class="guild ${guildLevel(player.guildMember.guild.currentPercentile)}">[${player.guildMember.guild.tag}]</span></p>` : ""}
414
414
  <p class="matches"><span>场次:${player.matchCount}(<span class="win">${player.winCount}</span>/<span class="lose">${player.matchCount - player.winCount}</span>)</span>胜率:<span style="color:${utils.winRateColor(
@@ -481,7 +481,7 @@
481
481
  <span class="lose" style="${position.matchCount - position.winCount == 0 ? "visibility:hidden;" : ""}width: ${(position.matchCount - position.winCount) * pixelOfPerMatchInPosition}px">${position.matchCount - position.winCount}</span>`).join("") %>
482
482
  </div>
483
483
  </div>
484
- <%- player.streak>1?`<div class="streak" style="box-shadow:none;color:${utils.winRateColor((player.streak + 10) / 20)};">${Math.abs(player.streak) + (player.streak > 0 ? "连胜" : "连败")}</div>`:"" %>
484
+ <%- Math.abs(player.streak)>1?`<div class="streak" style="box-shadow:none;color:${utils.winRateColor((player.streak + 10) / 20)};">${Math.abs(player.streak) + (player.streak > 0 ? "连胜" : "连败")}</div>`:"" %>
485
485
  <table class="matches">
486
486
  <colgroup>
487
487
  <col style="width: auto" />