From 2045d422d51aab9252086c758a9e73bd5d2f3fce Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Wed, 26 Jan 2022 19:58:22 +0700 Subject: [PATCH] none --- program/speedtest.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/program/speedtest.py b/program/speedtest.py index ab34b4b..2edbc9e 100644 --- a/program/speedtest.py +++ b/program/speedtest.py @@ -1,4 +1,5 @@ # credit to TeamYukki for this speedtest module + import os import wget import speedtest @@ -15,19 +16,20 @@ from pyrogram.types import Message @Client.on_message(command(["speedtest", f"speedtest@{bname}"]) & ~filters.edited) @sudo_users_only async def run_speedtest(_, message: Message): - m = await message.reply_text("Running server speedtest -->") + m = await message.reply_text("⚡️ running server speedtest") try: test = speedtest.Speedtest() test.get_best_server() - m = await m.edit("Running download speedtest --->") + m = await m.edit("⚡️ running download speedtest..") test.download() - m = await m.edit("Running upload speedtest ---->") + m = await m.edit("⚡️ running upload speedtest...") test.upload() test.results.share() result = test.results.dict() except Exception as e: - return await m.edit(e) - m = await m.edit("🔄 Sharing speedtest results") + await m.edit(e) + return + m = await m.edit("🔄 sharing speedtest results") path = wget.download(result["share"]) output = f"""💡 **SpeedTest Results**