💫 增加真实删除数统计
This commit is contained in:
parent
8a0219cf02
commit
fd438c50a1
@ -27,7 +27,7 @@ async def prune(context):
|
|||||||
if messages:
|
if messages:
|
||||||
await context.client.delete_messages(input_chat, messages)
|
await context.client.delete_messages(input_chat, messages)
|
||||||
await log(f"批量删除了 {str(count)} 条消息。")
|
await log(f"批量删除了 {str(count)} 条消息。")
|
||||||
notification = await send_prune_notify(context, count)
|
notification = await send_prune_notify(context, count, count)
|
||||||
await sleep(.5)
|
await sleep(.5)
|
||||||
await notification.delete()
|
await notification.delete()
|
||||||
|
|
||||||
@ -51,8 +51,8 @@ async def selfprune(context):
|
|||||||
break
|
break
|
||||||
await message.delete()
|
await message.delete()
|
||||||
count_buffer += 1
|
count_buffer += 1
|
||||||
await log(f"批量删除了自行发送的 {str(count)} 条消息。")
|
await log(f"批量删除了自行发送的 {str(count_buffer)} / {str(count)} 条消息。")
|
||||||
notification = await send_prune_notify(context, count)
|
notification = await send_prune_notify(context, count_buffer, count)
|
||||||
await sleep(.5)
|
await sleep(.5)
|
||||||
await notification.delete()
|
await notification.delete()
|
||||||
|
|
||||||
@ -83,8 +83,8 @@ async def yourprune(context):
|
|||||||
break
|
break
|
||||||
await message.delete()
|
await message.delete()
|
||||||
count_buffer += 1
|
count_buffer += 1
|
||||||
await log(f"批量删除了回复用户所发送的 {str(count)} 条消息。")
|
await log(f"批量删除了回复用户所发送的 {str(count_buffer)} / {str(count)} 条消息。")
|
||||||
notification = await send_prune_notify(context, count)
|
notification = await send_prune_notify(context, count_buffer, count)
|
||||||
await sleep(.5)
|
await sleep(.5)
|
||||||
await notification.delete()
|
await notification.delete()
|
||||||
|
|
||||||
@ -105,10 +105,10 @@ async def delete(context):
|
|||||||
await context.delete()
|
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(
|
return await context.client.send_message(
|
||||||
context.chat_id,
|
context.chat_id,
|
||||||
"删除了 "
|
"删除了 "
|
||||||
+ str(count)
|
+ str(count_buffer) + " / " + str(count)
|
||||||
+ " 条消息。"
|
+ " 条消息。"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user