mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 07:08:18 +00:00
一键跑路(删除群内消息并禁言)
This commit is contained in:
parent
5c147ed5ea
commit
2ab04ca053
25
paolu.py
Normal file
25
paolu.py
Normal file
@ -0,0 +1,25 @@
|
||||
""" PagerMaid Plugins Paolu """
|
||||
from asyncio import sleep
|
||||
from pagermaid import bot
|
||||
from pagermaid.listener import listener
|
||||
|
||||
@listener(is_plugin=True, outgoing=True, command="paolu",
|
||||
description="⚠一键跑路 删除群内消息并禁言⚠")
|
||||
async def paolu(context):
|
||||
"""一键跑路 删除群内消息并禁言"""
|
||||
await bot.edit_permissions(
|
||||
entity=context.chat_id,
|
||||
send_messages=False,
|
||||
send_media=False,
|
||||
send_stickers=False,
|
||||
send_gifs=False,
|
||||
send_games=False,
|
||||
send_inline=False,
|
||||
send_polls=False,
|
||||
invite_users=False,
|
||||
change_info=False,
|
||||
pin_messages=False)
|
||||
await bot.delete_messages(context.chat_id, list(range(1,context.message.id)))
|
||||
await context.edit("Finished")
|
||||
await sleep(10)
|
||||
await context.delete()
|
Loading…
Reference in New Issue
Block a user