Answer the question
In order to leave comments, you need to log in
How to pass message.text to the button click handler in Telebot?
@bot.message_handler(regexp=r'([a-z,0-9])')
def UserMessage(message):
#Получаем текст от пользователя
msg = message.text
@bot.callback_query_handler(func=lambda call: True)
def ans(call):
if call.data == "Кнопка":
pass
Answer the question
In order to leave comments, you need to log in
I solved the issue using global variables, I don’t know if it’s correct or not
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question