feat: 修改比赛信息中的开黑队友名字格式
This commit is contained in:
parent
e30de01f8c
commit
5c4b0a5896
6
dota.py
6
dota.py
@ -238,7 +238,11 @@ def serialize_match_for_discord(match_):
|
||||
dire_highest_damage_idx = 0
|
||||
|
||||
for player in match_['players']:
|
||||
desc = f"{player['nickname'] or player['personaname']}(Lv.**{player['level']}** {player['hero']}): **{player['kills']}** 杀 **{player['deaths']}** 死 **{player['assists']}** 助 | **{utils.shorten_digits(player['total_gold'])}** 经济 | **{utils.shorten_digits(player['hero_damage'])}** 伤害 "
|
||||
player_name = player['personaname']
|
||||
if player['nickname']:
|
||||
player_name = f"**{player['nickname']}**"
|
||||
|
||||
desc = f"{player_name}(Lv.**{player['level']}** {player['hero']}): **{player['kills']}** 杀 **{player['deaths']}** 死 **{player['assists']}** 助 | **{utils.shorten_digits(player['total_gold'])}** 经济 | **{utils.shorten_digits(player['hero_damage'])}** 伤害 "
|
||||
|
||||
if player['is_radiant']:
|
||||
radiant.append(desc)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user