Add Filters.poll to filter Poll messages

This commit is contained in:
Dan 2018-12-22 23:55:16 +01:00
parent 2b25b9469b
commit 8eab47123a

View File

@ -121,6 +121,9 @@ class Filters:
web_page = create("WebPage", lambda _, m: m.web_page)
"""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"))
"""Filter messages sent in private chats."""