killallmembers v1.1

This commit is contained in:
Pentacene 2020-12-23 17:07:50 +08:00 committed by GitHub
parent 96db140e00
commit 6a69c15c45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,13 @@
from pagermaid import bot, log
from pagermaid.listener import listener
""" 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:
@ -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)