Skip to content

Commit

Permalink
Add star_gift filter
Browse files Browse the repository at this point in the history
  • Loading branch information
KurimuzonAkuma committed Oct 14, 2024
1 parent dfb372d commit f7d932c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pyrogram/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,17 @@ async def gift_code_filter(_, __, m: Message):
"""Filter messages that contain :obj:`~pyrogram.types.GiftCode` objects."""


# endregion

# region star_gift_filter
async def star_gift_filter(_, __, m: Message):
return bool(m.star_gift)


star_gift = create(star_gift_filter)
"""Filter messages that contain :obj:`~pyrogram.types.StarGift` objects."""


# endregion

# region requested_chats_filter
Expand Down

0 comments on commit f7d932c

Please sign in to comment.