From 093d1e0dcb15c931f8af7a96b095a08a44685ac0 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Tue, 25 Aug 2020 14:08:53 +0200 Subject: [PATCH] Fix filters.user and .chat breaking when no initial collection is passed --- pyrogram/handlers/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/handlers/handler.py b/pyrogram/handlers/handler.py index d4d41ea5..1f3d2af6 100644 --- a/pyrogram/handlers/handler.py +++ b/pyrogram/handlers/handler.py @@ -30,7 +30,7 @@ class Handler: self.filters = filters async def check(self, client: "pyrogram.Client", update: Update): - if self.filters: + if callable(self.filters): if inspect.iscoroutinefunction(self.filters.__call__): return await self.filters(client, update) else: