Answer the question
In order to leave comments, you need to log in
Telegram bot in Python. How to make a back button?
How to make a back button? So that in ReplyKeyboardMarkup and InlineKeyboardButton each time the button sends the user to the pre-menu?
Already climbed everything.
There is an option to insert the entire menu, but then there are a lot of lines. Can you tell me how you can translate to the previous me.
1) How to make a button back to the previous. menu??
2) How to make a button from the first menu?
CODE:
import config
import telebot
from telebot import types
from requests import get
bot = telebot.TeleBot(config.token)
@bot.message_handler(commands=['start'])
def welcome(message):
markup = types.ReplyKeyboardMarkup(resize_keyboard =True)
item1 = types.KeyboardButton("cob")
item2 = types.KeyboardButton ("Kіnets")
markup.add(item1, item2)
bot.send_photo(message.chat.id, get(" https://tms1.visicom.ua/2.0.0/planet3/base/17 /7669... ").content)
bot.send_message(message.chat.id, "Good day " + message.from_user.first_name + ", I'm a bot consultant ", reply_markup=markup)
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