From fd438c50a15d50facfec8ce5aad90466c46fa068 Mon Sep 17 00:00:00 2001 From: Xtao_dada Date: Fri, 7 Aug 2020 20:05:50 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AB=20=E5=A2=9E=E5=8A=A0=E7=9C=9F?= =?UTF-8?q?=E5=AE=9E=E5=88=A0=E9=99=A4=E6=95=B0=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagermaid/modules/prune.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pagermaid/modules/prune.py b/pagermaid/modules/prune.py index 0f6530d..1a39cbb 100644 --- a/pagermaid/modules/prune.py +++ b/pagermaid/modules/prune.py @@ -27,7 +27,7 @@ async def prune(context): if messages: await context.client.delete_messages(input_chat, messages) await log(f"批量删除了 {str(count)} 条消息。") - notification = await send_prune_notify(context, count) + notification = await send_prune_notify(context, count, count) await sleep(.5) await notification.delete() @@ -51,8 +51,8 @@ async def selfprune(context): break await message.delete() count_buffer += 1 - await log(f"批量删除了自行发送的 {str(count)} 条消息。") - notification = await send_prune_notify(context, count) + await log(f"批量删除了自行发送的 {str(count_buffer)} / {str(count)} 条消息。") + notification = await send_prune_notify(context, count_buffer, count) await sleep(.5) await notification.delete() @@ -83,8 +83,8 @@ async def yourprune(context): break await message.delete() count_buffer += 1 - await log(f"批量删除了回复用户所发送的 {str(count)} 条消息。") - notification = await send_prune_notify(context, count) + await log(f"批量删除了回复用户所发送的 {str(count_buffer)} / {str(count)} 条消息。") + notification = await send_prune_notify(context, count_buffer, count) await sleep(.5) await notification.delete() @@ -105,10 +105,10 @@ async def delete(context): await context.delete() -async def send_prune_notify(context, count): +async def send_prune_notify(context, count_buffer, count): return await context.client.send_message( context.chat_id, "删除了 " - + str(count) + + str(count_buffer) + " / " + str(count) + " 条消息。" )