feat: Add hero name translation for match report embeds
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
269f47fc6c
commit
a2de839a6d
2
dota.py
2
dota.py
@ -167,7 +167,7 @@ class Friend(BaseModel):
|
||||
|
||||
# start_time = datetime.datetime.fromtimestamp(match_['start_time']).strftime('%Y-%m-%dT%H:%M:%S.000+08:00')
|
||||
end_time = datetime.datetime.fromtimestamp(match_['end_time']).strftime('%Y-%m-%dT%H:%M:%S.000+08:00')
|
||||
hero_name = Hero.get(hero_id=match_['hero_id']).localized_name
|
||||
hero_name = utils.get_hero_chinese_name(Hero.get(hero_id=match_['hero_id']).localized_name)
|
||||
data['embeds'].append({
|
||||
'title': f"{hero_name} {match_['kills']} 杀 {match_['deaths']} 死 {match_['assists']} 助 ",
|
||||
'description': summary,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user