mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Add Filters.bot
This commit is contained in:
parent
c0890d8cdb
commit
5be87a0dec
1 changed files with 3 additions and 0 deletions
|
|
@ -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."""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue