mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Add "bot" chat type into Filters.private.
Bots are still 1-to-1 private chats
This commit is contained in:
parent
385ab22b68
commit
f2b3db47a9
@ -136,7 +136,7 @@ class Filters:
|
|||||||
poll = create(lambda _, m: m.poll, "PollFilter")
|
poll = create(lambda _, m: m.poll, "PollFilter")
|
||||||
"""Filter messages that contain :obj:`Poll` objects."""
|
"""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."""
|
"""Filter messages sent in private chats."""
|
||||||
|
|
||||||
group = create(lambda _, m: bool(m.chat and m.chat.type in {"group", "supergroup"}), "GroupFilter")
|
group = create(lambda _, m: bool(m.chat and m.chat.type in {"group", "supergroup"}), "GroupFilter")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user