From 2bae19643ab468dc9aec466a16e7a9981fa58ddc Mon Sep 17 00:00:00 2001 From: Ching L Date: Wed, 5 Mar 2025 18:30:50 +0800 Subject: [PATCH] feat: Add hero name translation for match report embeds --- dota.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dota.py b/dota.py index 499ff3b..150e743 100644 --- a/dota.py +++ b/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,