mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 01:57:46 +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
|
||||
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()
|
||||
await context.delete()
|
||||
|
Loading…
Reference in New Issue
Block a user