Przeglądaj źródła

takes too much time to ping all DCs sending a message before pinging

thehamkercat 5 lat temu
rodzic
commit
15a7e15176
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      wbb/modules/ping.py

+ 2 - 1
wbb/modules/ping.py

@@ -9,12 +9,13 @@ __HELP__ = " - /ping - to check if I am Alive or Not"
 @app.on_message(cust_filter.command(commands=(["ping"])))
 async def ping(client, message):
     app.set_parse_mode("markdown")
+    m = await message.reply_text("Wait, Pinging all Datacenters")
     ping1 = round(requests.head("https://cdn1.telesco.pe/").elapsed.total_seconds() * 1000)
     ping2 = round(requests.head("https://cdn2.telesco.pe/").elapsed.total_seconds() * 1000)
     ping3 = round(requests.head("https://cdn3.telesco.pe/").elapsed.total_seconds() * 1000)
     ping4 = round(requests.head("https://cdn4.telesco.pe/").elapsed.total_seconds() * 1000)
     ping5 = round(requests.head("https://cdn5.telesco.pe/").elapsed.total_seconds() * 1000)
-    await message.reply_text(f'''
+    await m.edit(f'''
 ```DC1 - {ping1}ms
 DC2 - {ping2}ms
 DC3 - {ping3}ms