@sjtdev/koishi-plugin-dota2tracker 1.2.7-beta → 1.2.7-beta.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 +6 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1665,7 +1665,12 @@ async function apply(ctx, config) {
|
|
|
1665
1665
|
let player = players.find((player2) => subPlayer.steamId == player2.steamAccount.id);
|
|
1666
1666
|
if (!player)
|
|
1667
1667
|
continue;
|
|
1668
|
-
|
|
1668
|
+
let guildMember;
|
|
1669
|
+
try {
|
|
1670
|
+
guildMember = await ctx.bots.find((bot) => bot.platform == subPlayer.platform)?.getGuildMember(subPlayer.guildId, subPlayer.userId);
|
|
1671
|
+
} catch (error) {
|
|
1672
|
+
ctx.logger.error("获取群组信息失败。Error:" + error);
|
|
1673
|
+
}
|
|
1669
1674
|
subPlayer.name = subPlayer.nickName || (guildMember?.nick ?? players.find((player2) => player2.steamAccount.id == subPlayer.steamId)?.steamAccount.name);
|
|
1670
1675
|
player.winCount = player.matches.filter((match) => match.didRadiantWin == match.players.find((innerPlayer) => innerPlayer.steamAccount.id == player.steamAccount.id).isRadiant).length;
|
|
1671
1676
|
player.loseCount = player.matches.length - player.winCount;
|