mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Revert "pyrofork: handlers: message: check: fix errors when message.chat or message.from_user is None"
This reverts commit c8768f65cf.
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
1cbcffded1
commit
ad4dc01c8d
1 changed files with 2 additions and 2 deletions
|
|
@ -102,7 +102,7 @@ class MessageHandler(Handler):
|
|||
"""
|
||||
listener_does_match = (
|
||||
await self.check_if_has_matching_listener(client, message)
|
||||
)[0] if message.chat is not None and message.from_user is not None else False
|
||||
)[0]
|
||||
|
||||
if callable(self.filters):
|
||||
if iscoroutinefunction(self.filters.__call__):
|
||||
|
|
@ -129,7 +129,7 @@ class MessageHandler(Handler):
|
|||
"""
|
||||
listener_does_match, listener = await self.check_if_has_matching_listener(
|
||||
client, message
|
||||
) if message.chat is not None and message.from_user is not None else False, None
|
||||
)
|
||||
|
||||
if listener and listener_does_match:
|
||||
client.remove_listener(listener)
|
||||
|
|
|
|||
Loading…
Reference in a new issue