mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 08:34:52 +00:00
paolu 修复删除的消息不存在时报错
This commit is contained in:
parent
eb3830159b
commit
49a0c0698e
@ -362,7 +362,7 @@
|
||||
},
|
||||
{
|
||||
"name": "paolu",
|
||||
"version": "1.02",
|
||||
"version": "1.021",
|
||||
"section": "chat",
|
||||
"maintainer": "Pentacene",
|
||||
"size": "1.0 kb",
|
||||
|
4
paolu.py
4
paolu.py
@ -8,6 +8,7 @@
|
||||
#
|
||||
|
||||
from asyncio import sleep
|
||||
from telethon.errors.common import MultiError
|
||||
from pagermaid.listener import listener
|
||||
from pagermaid.utils import alias_command
|
||||
|
||||
@ -31,7 +32,10 @@ async def paolu(context):
|
||||
pin_messages=False)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
await context.client.delete_messages(context.chat_id, list(range(1, context.message.id)))
|
||||
except MultiError:
|
||||
pass
|
||||
try:
|
||||
await context.client.edit_permissions(
|
||||
entity=context.chat_id,
|
||||
|
Loading…
Reference in New Issue
Block a user