ping.py 426 B

12345678910111213
  1. from wbb import app
  2. import time
  3. from wbb.utils import cust_filter
  4. __MODULE__ = "Ping"
  5. __HELP__ = " - /ping - to check if I am Alive or Not"
  6. @app.on_message(cust_filter.command(commands = (["ping"])))
  7. async def ping(client, message):
  8. start_time = int(round(time.time() * 1000))
  9. m = await message.reply_text("Starting Ping")
  10. end_time = int(round(time.time() * 1000))
  11. await m.edit(f'{end_time - start_time} ms')