M
M
Maksym2020-05-11 00:23:32
Python
Maksym, 2020-05-11 00:23:32

How to forward messages from bot so keyboard stays python-telegram-bot with inline keyboard?

The bot sends a message with an inline keyboard, I need to make sure that when I forward this message to another chat, the keyboard remains. Can I do it? I use the python-telegram-bot framework

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cyril, 2020-05-11
@Pus1st

Yes, just like in a chat with a bot. Example:

....
key = InlineKeyboardButton(text=text_btn, callback_data="callback")
context.bot.send_photo(chat_id="@name",
                               photo=photo,
                               caption=caption,
                               reply_markup=InlineKeyboardMarkup(key))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question