V
V
vitalii_t122019-05-10 11:30:50
Python
vitalii_t12, 2019-05-10 11:30:50

How to use telegram.ReplykeyboardMarkup?

Trying to create a menu for a bot, I use ReplyKeyboardMarkup from the telegram library (the whole bot is built on it)
While I was looking for a menu solution, I came across this resource:
https://github.com/python-telegram-bot/python-tele...
here Describes working with InlineKeyboardMarkup using the function , but says that it can also be used with ReplyKeyboardMarkup.
No matter how hard I try, I can't use ReplyKeyboardMarkup

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danil K., 2019-08-28
@Danya_Violet

If you are talking about this
then:

@bot.message_handler(commands=['start'])
def cmd_start(message):
    start_keyboard = types.InlineKeyboardMarkup()
    start_service = types.InlineKeyboardButton(text='Службы', callback_data='service')
    start_system = types.InlineKeyboardButton(text='Система', callback_data='system')
    start_check = types.InlineKeyboardButton(text='Чек', callback_data='check')
    start_other = types.InlineKeyboardButton(text='Другое', callback_data='other')
    start_keyboard.add(start_service, start_system)
    start_keyboard.add(start_check, start_other)
    bot.send_message(message.chat.id, '', reply_markup=start_keyboard)

    start = telebot.types.ReplyKeyboardMarkup(True, False)
    start.row('Wunderlist')
    start.row('Telegraph')
    start.row('Погода')
    start.row('Контакты')
    bot.send_message(message.from_user.id, 'Выбери сервис', reply_markup=start)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question