Answer the question
In order to leave comments, you need to log in
How to make another function run from callback_query_handler?
@bot.callback_query_handler(func=lambda call: True)
def callback_query(call):
if call.data == "cb_rol":
bot.register_next_step_handler(call.message, rol)
elif call.data == "cb_dn":
bot.answer_callback_query(call.id, "День")
@bot.message_handler(content_types=['text'])
def rol(message):
print('test')
Answer the question
In order to leave comments, you need to log in
What's the other function? What are you currently unable to do? After a question has been asked, read it and consider whether everything about the question is clear.
If you want to call the rol function , you don't need to wrap it in a decorator.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question