From 96e019538aca2646f9a0fac178623466b339cd8f Mon Sep 17 00:00:00 2001 From: xtaodada Date: Fri, 18 Jun 2021 20:23:22 +0800 Subject: [PATCH] =?UTF-8?q?xtao-some=20getdel=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=8F=AA=E6=9F=A5=E8=AF=A2=E4=B8=8D=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- list.json | 2 +- xtao-some.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/list.json b/list.json index 516dd97..b76438e 100644 --- a/list.json +++ b/list.json @@ -62,7 +62,7 @@ }, { "name": "xtao-some", - "version": "1.19", + "version": "1.20", "section": "daily", "maintainer": "xtaodada", "size": "18.8 kb", diff --git a/xtao-some.py b/xtao-some.py index 2912bc0..07d4369 100644 --- a/xtao-some.py +++ b/xtao-some.py @@ -279,6 +279,9 @@ async def getdel(context): """ PagerMaid getdel. """ cid = str(context.chat_id) pri = cid.startswith('-100') + parameter = None + if len(context.parameter) == 1: + parameter = context.parameter[0] if pri: member_count = 0 try: @@ -291,13 +294,13 @@ async def getdel(context): async for member in bot.iter_participants(chat): if member.deleted: member_count += 1 - if need_kick: + if need_kick and parameter: try: await context.client.kick_participant(context.chat_id, member.id) except FloodWaitError: await context.edit('处理失败,您已受到 TG 服务器限制。') return - if need_kick: + if need_kick and parameter: await context.edit(f'此频道/群组的死号数:`{member_count}`,并且已经清理完毕。') else: await context.edit(f'此频道/群组的死号数:`{member_count}`。')