From 4df9357b48935133bb45750f30ffbad223a047dc Mon Sep 17 00:00:00 2001 From: Princic-1837592 <48788808+Princic-1837592@users.noreply.github.com> Date: Thu, 20 Aug 2020 16:38:54 +0200 Subject: [PATCH] Added Filters.all (#464) Useful filter to use as default value when extending Handler class --- pyrogram/client/filters/filters.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyrogram/client/filters/filters.py b/pyrogram/client/filters/filters.py index e872d724..fd4a947c 100644 --- a/pyrogram/client/filters/filters.py +++ b/pyrogram/client/filters/filters.py @@ -65,6 +65,9 @@ class Filters: create = create + all = create(lambda _, m: True, "AllFilter") + """Filter all messages.""" + me = create(lambda _, m: bool(m.from_user and m.from_user.is_self), "MeFilter") """Filter messages generated by you yourself."""