mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-29 08:34:17 +00:00
commit
2eacfece1c
@ -352,7 +352,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "paolu",
|
"name": "paolu",
|
||||||
"version": "1.00",
|
"version": "1.01",
|
||||||
"section": "chat",
|
"section": "chat",
|
||||||
"maintainer": "Pentacene",
|
"maintainer": "Pentacene",
|
||||||
"size": "1.0 kb",
|
"size": "1.0 kb",
|
||||||
|
22
paolu.py
22
paolu.py
@ -1,13 +1,21 @@
|
|||||||
""" PagerMaid Plugins Paolu """
|
""" PagerMaid Plugins Paolu """
|
||||||
|
# ______ _
|
||||||
|
# | ___ \ | |
|
||||||
|
# | |_/ /__ _ __ | |_ __ _ ___ ___ _ __ ___
|
||||||
|
# | __/ _ \ '_ \| __/ _` |/ __/ _ \ '_ \ / _ \
|
||||||
|
# | | | __/ | | | || (_| | (_| __/ | | | __/
|
||||||
|
# \_| \___|_| |_|\__\__,_|\___\___|_| |_|\___|
|
||||||
|
#
|
||||||
|
|
||||||
from asyncio import sleep
|
from asyncio import sleep
|
||||||
from pagermaid import bot
|
|
||||||
from pagermaid.listener import listener
|
from pagermaid.listener import listener
|
||||||
|
|
||||||
@listener(is_plugin=True, outgoing=True, command="paolu",
|
@listener(is_plugin=True, outgoing=True, command="paolu",
|
||||||
description="⚠一键跑路 删除群内消息并禁言⚠")
|
description="⚠一键跑路 删除群内消息并禁言⚠")
|
||||||
async def paolu(context):
|
async def paolu(context):
|
||||||
"""一键跑路 删除群内消息并禁言"""
|
"""一键跑路 删除群内消息并禁言"""
|
||||||
await bot.edit_permissions(
|
try:
|
||||||
|
await context.client.edit_permissions(
|
||||||
entity=context.chat_id,
|
entity=context.chat_id,
|
||||||
send_messages=False,
|
send_messages=False,
|
||||||
send_media=False,
|
send_media=False,
|
||||||
@ -19,7 +27,15 @@ async def paolu(context):
|
|||||||
invite_users=False,
|
invite_users=False,
|
||||||
change_info=False,
|
change_info=False,
|
||||||
pin_messages=False)
|
pin_messages=False)
|
||||||
await bot.delete_messages(context.chat_id, list(range(1,context.message.id)))
|
except:
|
||||||
|
pass
|
||||||
|
await context.client.delete_messages(context.chat_id, list(range(1,context.message.id)))
|
||||||
|
try:
|
||||||
|
await context.client.edit_permissions(
|
||||||
|
entity=context.chat_id,
|
||||||
|
send_messages=False)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
await context.edit("Finished")
|
await context.edit("Finished")
|
||||||
await sleep(10)
|
await sleep(10)
|
||||||
await context.delete()
|
await context.delete()
|
||||||
|
Loading…
Reference in New Issue
Block a user