Spaces:
Running
Running
Update akn/Akeno/ping.py
Browse files- akn/Akeno/ping.py +19 -3
akn/Akeno/ping.py
CHANGED
@@ -38,6 +38,12 @@ def get_readable_time(seconds: int) -> str:
|
|
38 |
|
39 |
return readable_time
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
@Akeno(
|
42 |
~filters.scheduled
|
43 |
& command(["cping"])
|
@@ -58,9 +64,19 @@ async def custom_ping_handler(client: Client, message: Message):
|
|
58 |
await asyncio.sleep(1.5)
|
59 |
end = dt.now()
|
60 |
duration = (end - start).microseconds / 1000
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
module = modules_help.add_module("ping", __file__)
|
66 |
module.add_command("ping", "to testing ping.")
|
|
|
38 |
|
39 |
return readable_time
|
40 |
|
41 |
+
custom_blue = "<emoji id=5328317370647715629>✅</emoji>"
|
42 |
+
custom_cat = "<emoji id=5352865784508980799>🗿</emoji>"
|
43 |
+
custom_pong = "<emoji id=5269563867305879894>🗿</emoji>"
|
44 |
+
custom_balon = "<emoji id=5407064810040864883>🗿</emoji>"
|
45 |
+
custom_owner = "<emoji id=5467406098367521267>🗿</emoji>"
|
46 |
+
|
47 |
@Akeno(
|
48 |
~filters.scheduled
|
49 |
& command(["cping"])
|
|
|
64 |
await asyncio.sleep(1.5)
|
65 |
end = dt.now()
|
66 |
duration = (end - start).microseconds / 1000
|
67 |
+
if client.me.is_premium:
|
68 |
+
await lol.edit_text(
|
69 |
+
f"**TEST** ◎ **PING**\n"
|
70 |
+
f"{custom_pong} **Pɪɴɢᴇʀ :** "
|
71 |
+
f"`%sms` \n"
|
72 |
+
f"{custom_balon} **Uᴘᴛɪᴍᴇ :** "
|
73 |
+
f"`{uptime}` \n"
|
74 |
+
f"{custom_owner} **Oᴡɴᴇʀ :** `{client.me.mention}`" % (duration)
|
75 |
+
)
|
76 |
+
else:
|
77 |
+
await lol.edit_text(
|
78 |
+
f" **Pong !!** " f"`%sms` \n" f" **Uptime** - " f"`{uptime}` " % (duration)
|
79 |
+
)
|
80 |
|
81 |
module = modules_help.add_module("ping", __file__)
|
82 |
module.add_command("ping", "to testing ping.")
|