Added filters requested_chat and story (#18)

Add requested_chats and story filter

---------

Co-authored-by: KurimuzonAkuma <31959970+KurimuzonAkuma@users.noreply.github.com>
This commit is contained in:
Yehuda lev 2023-12-24 23:10:17 +02:00 committed by GitHub
parent 6c0de2c601
commit 5c08159841
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -348,6 +348,28 @@ gift_code = create(gift_code_filter)
"""Filter messages that contain :obj:`~pyrogram.types.GiftCode` objects."""
# endregion
# region requested_chats_filter
async def requested_chats_filter(_, __, m: Message):
return bool(m.requested_chats)
requested_chats = create(requested_chats_filter)
"""Filter service messages for request chats."""
# endregion
# region story_filter
async def story_filter(_, __, m: Message):
return bool(m.story)
story = create(story_filter)
"""Filter messages that contain :obj:`~pyrogram.types.Story` objects."""
# endregion
# region video_filter