mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-01 21:24:50 +00:00
Add incoming and outgoing filters
This commit is contained in:
parent
3e4135c8e1
commit
e22f7896f8
1 changed files with 6 additions and 0 deletions
|
|
@ -32,6 +32,12 @@ class Filters:
|
|||
"""This class provides access to all Filters available in Pyrogram.
|
||||
Filters are intended to be used with the :obj:`MessageHandler <pyrogram.MessageHandler>`."""
|
||||
|
||||
incoming = build("Incoming", lambda _, m: not m.outgoing)
|
||||
"""Filter incoming messages."""
|
||||
|
||||
outgoing = build("Outgoing", lambda _, m: m.outgoing)
|
||||
"""Filter outgoing messages."""
|
||||
|
||||
text = build("Text", lambda _, m: bool(m.text and not m.text.startswith("/")))
|
||||
"""Filter text messages."""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue