@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 +2 -2
- package/package.json +1 -1
- package/readme.md +1 -0
- package/template/player/player_1.ejs +2 -2
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
|
|
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
package/readme.md
CHANGED
|
@@ -408,7 +408,7 @@
|
|
|
408
408
|
<div class="wrapper">
|
|
409
409
|
<div class="player">
|
|
410
410
|
<%- `
|
|
411
|
-
<div class="avatar"><img src="${player.steamAccount
|
|
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" />
|