mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 12:15:37 +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:
|
if dialog.id > 0:
|
||||||
continue
|
continue
|
||||||
async for message in context.client.iter_messages(dialog.id, from_user="me"):
|
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:
|
if count_buffer == count:
|
||||||
break
|
break
|
||||||
await message.delete()
|
await message.delete()
|
||||||
@ -42,6 +44,8 @@ async def dmfg(context: Message) -> None:
|
|||||||
async for dialog in context.client.iter_dialogs():
|
async for dialog in context.client.iter_dialogs():
|
||||||
if dialog.id > 0:
|
if dialog.id > 0:
|
||||||
async for message in context.client.iter_messages(dialog.id, from_user="me"):
|
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:
|
if count_buffer == count:
|
||||||
break
|
break
|
||||||
await message.delete()
|
await message.delete()
|
||||||
|
Loading…
Reference in New Issue
Block a user