mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 07:47:39 +00:00
killallmembers v1.1
This commit is contained in:
parent
96db140e00
commit
6a69c15c45
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user