Show log ring in ping
This commit is contained in:
parent
ce12028aa2
commit
c3b08e0c5f
|
@ -1,6 +1,6 @@
|
||||||
import time
|
import time
|
||||||
from pyrogram import Client, filters
|
from pyrogram import Client, filters
|
||||||
from .. import config, help_dict, log_errors, public_log_errors
|
from .. import config, help_dict, log_errors, public_log_errors, log_ring
|
||||||
|
|
||||||
@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ping', 'pong'], prefixes=config['config']['prefixes']))
|
@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ping', 'pong'], prefixes=config['config']['prefixes']))
|
||||||
@log_errors
|
@log_errors
|
||||||
|
@ -14,7 +14,7 @@ async def ping_pong(client, message):
|
||||||
start = time.time()
|
start = time.time()
|
||||||
reply = await message.reply_text(text)
|
reply = await message.reply_text(text)
|
||||||
end = time.time()
|
end = time.time()
|
||||||
await reply.edit_text(f'{text}\n<i>{round((end-start)*1000)}ms</i>')
|
await reply.edit_text(f'{text}\n<i>{round((end-start)*1000)}ms</i>\n<b>Log Ring:</b> <i>{len(log_ring)}/{log_ring.maxlen}</i>')
|
||||||
|
|
||||||
help_dict['ping'] = ('Ping',
|
help_dict['ping'] = ('Ping',
|
||||||
'''{prefix}ping - Pong!
|
'''{prefix}ping - Pong!
|
||||||
|
|
Loading…
Reference in New Issue