mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Less arbitrary name for Filter, Adapt Docstring
This commit is contained in:
parent
2eba6e58f9
commit
04aada818e
@ -346,12 +346,11 @@ class Filters:
|
|||||||
Parameters:
|
Parameters:
|
||||||
data (``str`` | ``bytes``):
|
data (``str`` | ``bytes``):
|
||||||
Pass the data you want to filter for.
|
Pass the data you want to filter for.
|
||||||
Defaults to None (no data).
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def f(_, cb):
|
def f(_, cb):
|
||||||
return bool(cb.data and cb.data == _.d)
|
return bool(cb.data and cb.data == _.d)
|
||||||
|
|
||||||
return create("Data", f, d=data)
|
return create("CallbackData", f, d=data)
|
||||||
|
|
||||||
dan = create("Dan", lambda _, m: bool(m.from_user and m.from_user.id == 23122162))
|
dan = create("Dan", lambda _, m: bool(m.from_user and m.from_user.id == 23122162))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user