paolu v1.01

This commit is contained in:
b miao 2021-04-16 23:48:39 +08:00
commit a5d3ef0ab8
3 changed files with 14 additions and 5 deletions

View File

@ -193,6 +193,8 @@ async def process_message(context):
reply_user_id = reply.sender.id
if context.sticker:
return
if context.chat_id > 0:
return
except:
pass

View File

@ -362,7 +362,7 @@
},
{
"name": "autoreplysticker",
"version": "1.10",
"version": "1.11",
"section": "chat",
"maintainer": "Pentacene",
"size": "8.3 kb",

View File

@ -1,6 +1,13 @@
""" PagerMaid Plugins Paolu """
# ______ _
# | ___ \ | |
# | |_/ /__ _ __ | |_ __ _ ___ ___ _ __ ___
# | __/ _ \ '_ \| __/ _` |/ __/ _ \ '_ \ / _ \
# | | | __/ | | | || (_| | (_| __/ | | | __/
# \_| \___|_| |_|\__\__,_|\___\___|_| |_|\___|
#
from asyncio import sleep
from pagermaid import bot
from pagermaid.listener import listener
@listener(is_plugin=True, outgoing=True, command="paolu",
@ -8,7 +15,7 @@ from pagermaid.listener import listener
async def paolu(context):
"""一键跑路 删除群内消息并禁言"""
try:
await bot.edit_permissions(
await context.client.edit_permissions(
entity=context.chat_id,
send_messages=False,
send_media=False,
@ -22,9 +29,9 @@ async def paolu(context):
pin_messages=False)
except:
pass
await bot.delete_messages(context.chat_id, list(range(1,context.message.id)))
await context.client.delete_messages(context.chat_id, list(range(1,context.message.id)))
try:
await bot.edit_permissions(
await context.client.edit_permissions(
entity=context.chat_id,
send_messages=False)
except: