mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
Add forum filter
This commit is contained in:
parent
5f43892a44
commit
8e201b941d
@ -513,6 +513,17 @@ channel = create(channel_filter)
|
||||
"""Filter messages sent in channels."""
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
# region forum_filter
|
||||
async def forum_filter(_, __, m: Message):
|
||||
return bool(m.chat and m.chat.is_forum)
|
||||
|
||||
|
||||
forum = create(forum_filter)
|
||||
"""Filter messages sent in forums."""
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
# region new_chat_members_filter
|
||||
|
Loading…
Reference in New Issue
Block a user