Merge pull request #165 from Pentacene/master

DeleteMsgsFromGrps v1.01 修复了删除信息把自己那条也删除导致的报错
This commit is contained in:
Pentacene 2021-05-18 13:28:32 +08:00 committed by GitHub
commit f916fad005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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()

View File

@ -372,7 +372,7 @@
},
{
"name": "deletemsgsfromgrps",
"version": "1.00",
"version": "1.01",
"section": "chat",
"maintainer": "Pentacene",
"size": "4 kb",