D
D
damir4ig2020-06-21 22:13:50
Python
damir4ig, 2020-06-21 22:13:50

PyTelegramBotApi How to send photo from url and add inline keyboard?

You need to send a photo from the imgur and add an inline keyboard to it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bog-pythona, 2020-06-22
@damir4ig

It's simple

keyboard = telebot.types.InlineKeyboardMarkup()
keyboard.row(
        telebot.types.InlineKeyboardButton("Кнопка1", callback_data="btn1"),
        telebot.types.InlineKeyboardButton("Кнопка2", callback_data="btn2"),
    )
bot.send_photo(message.chat.id, photo='url фото', caption="Подпись к фото", reply_markup=keyboard)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question