mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
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:
parent
6c0de2c601
commit
5c08159841
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user