Answer the question
In order to leave comments, you need to log in
How to bind buttons in a telegram bot to a photo with text?
if call.data == 'Executive':
pic = 'https://luxurytime.in/wp-content/uploads/2019/05/243-0043-1100x1100.jpg'
bot.send_photo(call.message.chat.id, pic, caption='ULYSSE NARDIN Executive \nМеханизм с автоматическим подзаводом \nЗапас хода: 42 часа \nКорпус: 43 мм, сталь, керамика, керамический безель\nЧерный циферблат, римские цифры\nЧерный каучуковый ремешок\nВодонепроницаемость: 100 м\nЧасы, минуты, секундная стрелка на 6-ти часах, дата \nВторой часовой пояс')
Answer the question
In order to leave comments, you need to log in
@bot.message_handler(content_types=['text'])
def text(message):
markup = telebot.types.InlineKeyboardMarkup()
btn = telebot.types.InlineKeyboardButton(text='Buy', callback_data='buy')
markup.add(btn)
bot.send_photo(chat_id=message.chat.id, photo=open('../jpg.jpg', 'rb'), caption='Текст под картинкой', reply_markup=markup)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question