mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-01 14:55:12 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -339,4 +339,15 @@ class Filters:
|
|||||||
and message.from_user.is_self
|
and message.from_user.is_self
|
||||||
and not message.outgoing)))
|
and not message.outgoing)))
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def callback_data(data: str or bytes):
|
||||||
|
"""Filter callback queries for their data.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
data (``str`` | ``bytes``):
|
||||||
|
Pass the data you want to filter for.
|
||||||
|
"""
|
||||||
|
|
||||||
|
return create("CallbackData", lambda flt, cb: cb.data == flt.data, data=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))
|
||||||
|
Reference in New Issue
Block a user