From 5be87a0dec8e043bb985d394b2daf58c60007555 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Tue, 8 May 2018 18:08:51 +0200 Subject: [PATCH] Add Filters.bot --- 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 de59d083..41bf2da3 100644 --- a/pyrogram/client/filters/filters.py +++ b/pyrogram/client/filters/filters.py @@ -32,6 +32,9 @@ class Filters: """This class provides access to all Filters available in Pyrogram. Filters are intended to be used with the :obj:`MessageHandler `.""" + bot = build("Bot", lambda _, m: bool(m.from_user and m.from_user.is_bot)) + """Filter messages coming from bots""" + incoming = build("Incoming", lambda _, m: not m.outgoing) """Filter incoming messages."""