Answer the question
In order to leave comments, you need to log in
Two keyboards not working together? InlineKeyboardMarkup ReplyKeyboardMarkup?
How to combine two keyboards? That doesn't work
. bot.send_message(c.message.chat.id, 'Be kind to bot.', reply_markup=key, reply_markup=markup)
import config
import telebot
from telebot import types
from requests import get
bot = telebot. TeleBot(config.token)
@bot.message_handler(commands=['start'])
def inline(message):
key = types.InlineKeyboardMarkup()
but_1 = types.InlineKeyboardButton(text="Ukrainian", callback_data="Ukrainian")
but_2 = types.InlineKeyboardButton(text="English", callback_data="English")
key.add(but_1, but_2)
bot.send_photo(message.chat.id,open("C:\\EMB.jpg",
bot.send_message(message.chat.id, "Good day" + message.from_user.first_name + ", I'm a bot-adviser of the Kiev Medical University. Radiy will help you. Good day. I am a chat bot of Kyiv Medical University. Glad to welcome you. Please choose the language of communication.", reply_markup=key)
@bot.callback_query_handler(func=lambda c:True)
def ukraine(c):
if c.data == 'Ukrainian':
key = types.InlineKeyboardMarkup()
but_1 = types.InlineKeyboardButton(text="Inline", callback_data="Intro")
but_2 = types.InlineKeyboardButton(text="Last Diploma", callback_data="Last Diploma")
but_3 = types.InlineKeyboardButton(text="Student", callback_data="Student")
but_4 = types.InlineKeyboardButton(text="Contact ID", callback_data="Contact ID")
but_5 = types.InlineKeyboardButton(text="Payment Details", url=" https://kmu.u.ua/oplata/ " )
key.add(but_1, but_2)
key.add(but_3, but_4)
key.add(but_5)
markup = types.ReplyKeyboardMarkup(resize_keyboard=True)
item1 = types.KeyboardButton("Cob")
item2 = types.KeyboardButton(" Kіnets")
markup.add(item1, item2)
bot.send_message(c.message.chat.id, 'Keep a weasel who will tickle you.', reply_markup=key)
Answer the question
In order to leave comments, you need to log in
What does it mean to merge keyboards? ReplyKeyboardMarkup appears at the bottom of the screen, InlineKeyboardMarkup is attached to a specific message. I don’t understand why they should be combined, especially since this is unlikely to work
Nick Korovkin,
Well, look:
I want, for example, that when the start command is pressed, an inline keyboard appears with the choice of Ukrainian and English, and a replica with phrases at the beginning and end also appears, and that this keyboard is always in the bot.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question