From 2ae8730b22462eba509ee400107099eaf82dfd98 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 15 Dec 2018 08:53:22 +0100 Subject: [PATCH] Add Filters.via_bot to filter messages sent via inline bots --- 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 9ae15239..fa9eace3 100644 --- a/pyrogram/client/filters/filters.py +++ b/pyrogram/client/filters/filters.py @@ -172,6 +172,9 @@ class Filters: mentioned = create("Mentioned", lambda _, m: bool(m.mentioned)) """Filter messages containing mentions""" + via_bot = create("ViaBot", lambda _, m: bool(m.via_bot)) + """Filter messages sent via inline bots""" + service = create("Service", lambda _, m: bool(m.service)) """Filter service messages. A service message contains any of the following fields set