@bot.callback_query_handler(func=lambda c: True)
def next1(message):
global name1
name1 = message.text
tovar = types.InlineKeyboardMarkup()
but_1 = types.InlineKeyboardButton(text='Пломбир Ванильный', callback_data='Пломбир')
but_2 = types.InlineKeyboardButton(text='Пломбир Шоколадный', callback_data='ПломбирШоколабный')
tovar.add(but_2)
tovar.add(but_1)
bot.send_message(
message.chat.id, 'Выберите ваше морожное', reply_markup=tovar)
@bot.callback_query_handler(lambda c:
c.data)
def callback_answer(callback_query: types.CallbackQuery, c):
if
c.data == 'Пломбир':
send1 = bot.send_message(
c.message.chat.id, 'Какую начинку вы хотите?')
bot.register_next_step_handler(send1, next2)