From 7574ec4821f081996f627138cc32f271ce11b5a0 Mon Sep 17 00:00:00 2001 From: blank X Date: Wed, 10 Mar 2021 15:52:43 +0700 Subject: [PATCH] change some things --- sukuinote/plugins/ping.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sukuinote/plugins/ping.py b/sukuinote/plugins/ping.py index 4b5e0cd..6414c11 100644 --- a/sukuinote/plugins/ping.py +++ b/sukuinote/plugins/ping.py @@ -2,19 +2,20 @@ import time from pyrogram import Client, filters from .. import config, help_dict, log_errors, public_log_errors, log_ring +strings = { + 'ping': 'Pong!', + 'pong': 'Ping!' +} + @Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ping', 'pong'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def ping_pong(client, message): - strings = { - 'ping': 'Pong!', - 'pong': 'Ping!' - } text = strings[message.command[0].lower()] start = time.time() - reply = await message.reply_text(text) + reply = await message.reply_text(f'{text}\nLog Ring: {len(log_ring)}/{log_ring.maxlen}') end = time.time() - await reply.edit_text(f'{text}\n{round((end-start)*1000)}ms\nLog Ring: {len(log_ring)}/{log_ring.maxlen}') + await reply.edit_text(f'{text} {round((end-start)*1000)}ms\nLog Ring: {len(log_ring)}/{log_ring.maxlen}') help_dict['ping'] = ('Ping', '''{prefix}ping - Pong!