Add media_spoiler filter

This commit is contained in:
Dan 2022-12-30 15:09:21 +01:00
parent c707a4baae
commit 06996d24ff

View File

@ -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