diff --git a/pyrogram/filters.py b/pyrogram/filters.py index 2e93b16942..4c6266b299 100644 --- a/pyrogram/filters.py +++ b/pyrogram/filters.py @@ -513,6 +513,17 @@ async def channel_filter(_, __, m: Message): """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