Skip to content

Commit 39e3cb9

Browse files
authored
| 𝐘ū𝐀𝐒 β€’ 𝐁π₯𝐚𝐜𝐀 𝐊𝐧𝐒𝐠𝐑𝐭𝐬 𝐔𝐧𝐒𝐨𝐧 |
1 parent c820f18 commit 39e3cb9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from pyrogram import filters
2+
3+
def callback_data(data):
4+
def func(flt, client, callback_query):
5+
return callback_query.data in flt.data
6+
7+
data = data if isinstance(data, list) else [data]
8+
return filters.create(
9+
func,
10+
'CustomCallbackDataFilter',
11+
data=data
12+
)

0 commit comments

Comments
Β (0)