Add "bot" chat type into Filters.private.

Bots are still 1-to-1 private chats
This commit is contained in:
Dan 2019-07-16 07:41:11 +02:00
parent 385ab22b68
commit f2b3db47a9

View File

@ -136,7 +136,7 @@ class Filters:
poll = create(lambda _, m: m.poll, "PollFilter")
"""Filter messages that contain :obj:`Poll` objects."""
private = create(lambda _, m: bool(m.chat and m.chat.type == "private"), "PrivateFilter")
private = create(lambda _, m: bool(m.chat and m.chat.type in {"private", "bot"}), "PrivateFilter")
"""Filter messages sent in private chats."""
group = create(lambda _, m: bool(m.chat and m.chat.type in {"group", "supergroup"}), "GroupFilter")