mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 11:26:47 +00:00
xtao-some getdel 支持只查询不删除
This commit is contained in:
parent
c67c9b44ee
commit
96e019538a
@ -62,7 +62,7 @@
|
||||
},
|
||||
{
|
||||
"name": "xtao-some",
|
||||
"version": "1.19",
|
||||
"version": "1.20",
|
||||
"section": "daily",
|
||||
"maintainer": "xtaodada",
|
||||
"size": "18.8 kb",
|
||||
|
@ -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}`。')
|
||||
|
Loading…
Reference in New Issue
Block a user