From 6cfe3b732cda869bb2131d86bb3af7962821cde3 Mon Sep 17 00:00:00 2001 From: Nikita Aksenov Date: Sat, 3 May 2025 22:22:24 +0300 Subject: [PATCH] URLs for tests implemented --- main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 93b5068..fdfe3b9 100644 --- a/main.py +++ b/main.py @@ -128,12 +128,19 @@ async def get_message_text() -> str: for i in range(len(tests)): test_name = tests[i]["name"].replace("[Тест] ", "").replace("[тест]", "") + test_url = tests[i].get("url") no = i + 1 if no < 11: no = NUMBER_EMOJIS[no] + " " else: no += ". " - text += str(no) + "" + test_name + text += str(no) + "" + + if test_url: + text += f"{test_name}" + else: + text += test_name + text += " — " text += await get_human_timedelta(tests[i]["time"]) text += f"\n("