mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 23:24:50 +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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue