From f2b3db47a9e4de2d0ccf52b3887fc65975360340 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Tue, 16 Jul 2019 07:41:11 +0200 Subject: [PATCH] Add "bot" chat type into Filters.private. Bots are still 1-to-1 private chats --- pyrogram/client/filters/filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/filters/filters.py b/pyrogram/client/filters/filters.py index d8768b3b..01d6bbd4 100644 --- a/pyrogram/client/filters/filters.py +++ b/pyrogram/client/filters/filters.py @@ -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")