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!