Answer the question
In order to leave comments, you need to log in
How to pass text to types.InlineKeyboardButton?
I have a button, telebot.types.InlineKeyboardButton(text="Text button", callback_data="func")
How to pass some text when clicking on it, so that in the func function in the call one could get it?
Answer the question
In order to leave comments, you need to log in
In callback_data, pass not only the name of the function, but also the required text itself. Then you parse where necessary from callback_data the name of the function and the text.
Example callback_data="func/your text"
Next, you parse the string and you're done.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question