Answer the question
In order to leave comments, you need to log in
Is it possible to change the callback?
@bot.callback_query_handler(lambda call: call.data == 'osh')
def callback_inline(call):
if call.data == 'osh':
bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text='Выберите регион:',
reply_markup=markups.osh())
if call.data == 'msk':
bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text='Выберите регион:',
reply_markup=markups.msk())
if call.data == 'moblast':
bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text='Выберите год:',
reply_markup=markups.moblast())
if call.data == 'god1':
bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text='Выберите этап:',
reply_markup=markups.god1())
if call.data == 'nap1':
bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text='Выберите предмет:',
reply_markup=markups.nap1())
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question