mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Add media_spoiler filter
This commit is contained in:
parent
65b045ff2d
commit
28307ca58e
1 changed files with 12 additions and 0 deletions
|
|
@ -425,6 +425,17 @@ dice = create(dice_filter)
|
|||
"""Filter messages that contain :obj:`~pyrogram.types.Dice` objects."""
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
# region media_spoiler
|
||||
async def media_spoiler_filter(_, __, m: Message):
|
||||
return bool(m.has_media_spoiler)
|
||||
|
||||
|
||||
media_spoiler = create(media_spoiler_filter)
|
||||
"""Filter media messages that contain a spoiler."""
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
# region private_filter
|
||||
|
|
@ -731,6 +742,7 @@ async def linked_channel_filter(_, __, m: Message):
|
|||
linked_channel = create(linked_channel_filter)
|
||||
"""Filter messages that are automatically forwarded from the linked channel to the group chat."""
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue