Improved deleted message handling (#645)
* Tidy up namings of invite link methods * Improved deleted message handling Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
This commit is contained in:
parent
293e852afd
commit
3be981ada1
@ -52,4 +52,10 @@ class DeletedMessagesHandler(Handler):
|
|||||||
super().__init__(callback, filters)
|
super().__init__(callback, filters)
|
||||||
|
|
||||||
async def check(self, client: "pyrogram.Client", messages: List[Message]):
|
async def check(self, client: "pyrogram.Client", messages: List[Message]):
|
||||||
return await super().check(client, messages[0]) if messages else False # The messages list can be empty
|
# Every message should be checked, if at least one matches the filter True is returned
|
||||||
|
# otherwise, or if the list is empty, False is returned
|
||||||
|
for message in messages:
|
||||||
|
if await super().check(client, message):
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user