mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 05:54:12 +00:00
Merge pull request #165 from Pentacene/master
DeleteMsgsFromGrps v1.01 修复了删除信息把自己那条也删除导致的报错
This commit is contained in:
commit
f916fad005
@ -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