mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 08:34:52 +00:00
DeleteMsgsFromGrps v1.01 修复了删除信息把自己那条也删除导致的报错
This commit is contained in:
parent
9ba23553f0
commit
c998b6728d
@ -27,6 +27,8 @@ async def dmfg(context: Message) -> None:
|
||||
if dialog.id > 0:
|
||||
continue
|
||||
async for message in context.client.iter_messages(dialog.id, from_user="me"):
|
||||
if dialog.id == context.chat_id and message.id == context.id:
|
||||
continue
|
||||
if count_buffer == count:
|
||||
break
|
||||
await message.delete()
|
||||
@ -42,6 +44,8 @@ async def dmfg(context: Message) -> None:
|
||||
async for dialog in context.client.iter_dialogs():
|
||||
if dialog.id > 0:
|
||||
async for message in context.client.iter_messages(dialog.id, from_user="me"):
|
||||
if dialog.id == context.chat_id and message.id == context.id:
|
||||
continue
|
||||
if count_buffer == count:
|
||||
break
|
||||
await message.delete()
|
||||
|
Loading…
Reference in New Issue
Block a user