2
0
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:
ColinShark 2019-06-01 23:36:45 +02:00
parent 2eba6e58f9
commit 04aada818e

View File

@ -346,12 +346,11 @@ class Filters:
Parameters:
data (``str`` | ``bytes``):
Pass the data you want to filter for.
Defaults to None (no data).
"""
def f(_, cb):
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))