mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-08 16:04:51 +00:00
Add Filters.poll to filter Poll messages
This commit is contained in:
parent
2b25b9469b
commit
8eab47123a
1 changed files with 3 additions and 0 deletions
|
|
@ -121,6 +121,9 @@ class Filters:
|
||||||
web_page = create("WebPage", lambda _, m: m.web_page)
|
web_page = create("WebPage", lambda _, m: m.web_page)
|
||||||
"""Filter messages sent with a webpage preview."""
|
"""Filter messages sent with a webpage preview."""
|
||||||
|
|
||||||
|
poll = create("Poll", lambda _, m: m.poll)
|
||||||
|
"""Filter messages that contain :obj:`Poll <pyrogram.api.types.pyrogram.Poll>` objects."""
|
||||||
|
|
||||||
private = create("Private", lambda _, m: bool(m.chat and m.chat.type == "private"))
|
private = create("Private", lambda _, m: bool(m.chat and m.chat.type == "private"))
|
||||||
"""Filter messages sent in private chats."""
|
"""Filter messages sent in private chats."""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue