How to call function from callback_data that changes? #3683
Answered
by
Bibo-Joshi
ArthurPains
asked this question in
Q&A
-
I'm having a problem when I need to deal with InlineKeyboardButton that change its callback_data constantly. What I want is that after I select one of the buttons with the name of the games (using edit_game function), I call another function (def select_side), but how do I pass this to the CallbackQueryHandler(select_side, pattern="^" + (I DON'T KNOW WHAT PUT HERE) + "$ ") ? I've tried using loop in every possible way to create a pattern for each game but I couldn't. How can I do this? I took the inlinekeyboard2.py example and tried to implement my code from it:
|
Beta Was this translation helpful? Give feedback.
Answered by
Bibo-Joshi
Apr 26, 2023
Replies: 1 comment 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ArthurPains
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
pattern
argument is optional. You could just omit it.