Skip to content

Commit

Permalink
add media filter (#19)
Browse files Browse the repository at this point in the history
* add media filters

* fix
  • Loading branch information
ihatemyself0 authored Jul 6, 2024
1 parent 483e5ab commit 97ec928
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tgram/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def __or__(self, other: "Filter") -> "Filter":
| new_chat_members
)

media = Filter(lambda m: isinstance(m, tgram.types.Message) and m.media)


def sender(ids: Union[str, int, List[Union[str, int]]]) -> Filter:
"""Filter messages coming from one or more sender chat"""
Expand Down

0 comments on commit 97ec928

Please sign in to comment.