mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Add Filters.me
Useful to filter messages coming from the current running user. Does the same thing as Filters.user("me")
This commit is contained in:
parent
d69a93d253
commit
36f987e979
@ -61,6 +61,9 @@ class Filters:
|
|||||||
|
|
||||||
create = create
|
create = create
|
||||||
|
|
||||||
|
me = create("Me", lambda _, m: bool(m.from_user and m.from_user.is_self))
|
||||||
|
"""Filter messages coming from you yourself"""
|
||||||
|
|
||||||
bot = create("Bot", lambda _, m: bool(m.from_user and m.from_user.is_bot))
|
bot = create("Bot", lambda _, m: bool(m.from_user and m.from_user.is_bot))
|
||||||
"""Filter messages coming from bots"""
|
"""Filter messages coming from bots"""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user