mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-09-28 11:47:56 +00:00
Add media_spoiler filter
This commit is contained in:
parent
c707a4baae
commit
06996d24ff
@ -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 New Issue
Block a user