Good day. There is a code telegram bot, which displays 4 buttons and when you click on each of them displays a message.
from telebot import types import constants, os, re bot = telebot.TeleBot(constants.token) @bot.message_handler(commands=["start"]) def inline(message): key = types.InlineKeyboardMarkup() but_1 = types.InlineKeyboardButton(text="NumberOne", callback_data="NumberOne") but_2 = types.InlineKeyboardButton(text="NumberTwo", callback_data="NumberTwo") but_3 = types.InlineKeyboardButton(text="NumberTree", callback_data="NumberTree") but_4 = types.InlineKeyboardButton(text="Number4", callback_data="Number4") key.add(but_1, but_2, but_3, but_4) bot.send_message(message.chat.id, "ΠΠ«ΠΠΠ ΠΠ’Π ΠΠΠΠΠΠ£", reply_markup=key) @bot.callback_query_handler(func=lambda c:True) def inlin(c): if c.data == 'NumberOne': bot.send_message(c.message.chat.id, 'ΠΡΠΎ ΠΊΠ½ΠΎΠΏΠΊΠ° 1') if c.data == 'NumberTwo': bot.send_message(c.message.chat.id, 'ΠΡΠΎ ΠΊΠ½ΠΎΠΏΠΊΠ° 2') if c.data == 'NumberTree': bot.send_message(c.message.chat.id, 'ΠΡΠΎ ΠΊΠ½ΠΎΠΏΠΊΠ° 3') if c.data == 'Number4': bot.send_message(c.message.chat.id, 'ΠΡΠΎ ΠΊΠ½ΠΎΠΏΠΊΠ° 4') if __name__ == "__main__": bot.polling(none_stop=True) How to do that when you click on a button - a new menu of several buttons opens, with the possibility of returning to the main menu?