diff --git a/killallmembers.py b/killallmembers.py index c074c27..1b624b0 100644 --- a/killallmembers.py +++ b/killallmembers.py @@ -1,13 +1,13 @@ -from pagermaid import bot, log -from pagermaid.listener import listener -from asyncio import sleep +""" PagerMaid Plugin killallmembers """ +from asyncio import sleep from telethon.tl.types import ChannelParticipantsAdmins -from telethon.tl.functions.channels import EditBannedRequest -from telethon.tl.types import ChatBannedRights +from pagermaid import bot +from pagermaid.listener import listener @listener(is_plugin=True, outgoing=True, command="killallmembers", description="⚠⚠慎用! 一件扬了群内所有成员⚠⚠") async def killallmembers(context): + """ PagerMaid Plugin killallmembers """ await context.edit('正在准备扬了这个破群的所有人...') chat = await context.get_chat() if not context.is_group: @@ -28,7 +28,7 @@ async def killallmembers(context): await sleep(10) await context.delete() return False - + if context.sender.id in admins_ids: i = 0 for user_id in users_wo_admins: @@ -36,7 +36,6 @@ async def killallmembers(context): await bot.edit_permissions(context.chat_id, user_id, view_messages=False) i += 1 await context.edit(f'进度:{i}/{len(users_wo_admins)}') - await sleep(.5) except: await context.edit('发生错误') await sleep(10) @@ -46,4 +45,4 @@ async def killallmembers(context): else: await context.edit('你又不是管理员,你在这儿干个屁?') await sleep(10) - await context.delete() \ No newline at end of file + await context.delete()