URLs for tests implemented

This commit is contained in:
Nikita Aksenov 2025-05-03 22:22:24 +03:00
parent 2bd06c4f96
commit 6cfe3b732c
No known key found for this signature in database
GPG key ID: 9DC1431B2123B2E8

View file

@ -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) + "<b>" + test_name
text += str(no) + "<b>"
if test_url:
text += f"<a href='{test_url}'>{test_name}</a>"
else:
text += test_name
text += "</b> — "
text += await get_human_timedelta(tests[i]["time"])
text += f"\n(<a href='{await generate_link(test_name, tests[i]['time'])}'>"