mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 06:32:47 +00:00
paolu v1.01
This commit is contained in:
commit
a5d3ef0ab8
@ -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
|
||||
|
||||
|
@ -362,7 +362,7 @@
|
||||
},
|
||||
{
|
||||
"name": "autoreplysticker",
|
||||
"version": "1.10",
|
||||
"version": "1.11",
|
||||
"section": "chat",
|
||||
"maintainer": "Pentacene",
|
||||
"size": "8.3 kb",
|
||||
|
15
paolu.py
15
paolu.py
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user