Add Filters.bot

This commit is contained in:
Dan 2018-05-08 18:08:51 +02:00
parent c0890d8cdb
commit 5be87a0dec

View File

@ -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 <pyrogram.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."""