Answer the question
In order to leave comments, you need to log in
How to set up ReplyKeyboard in Telegram?
I can’t make several buttons in 3 columns for some reason it doesn’t work, tell me what I looked at.
keyboard = types.ReplyKeyboardMarkup(row_width=3, one_time_keyboard=True, resize_keyboard=True)
keyboard.add(*[types.KeyboardButton(name) for name in['Одежда']])
keyboard.add(*[types.KeyboardButton(name) for name in['Обувь']])
keyboard.add(*[types.KeyboardButton(name) for name in['Сумки']])
keyboard.add(*[types.KeyboardButton(name) for name in['Часы']])
keyboard.add(*[types.KeyboardButton(name) for name in['Парфюм']])
keyboard.add(*[types.KeyboardButton(name) for name in['Очки']])
keyboard.add(*[types.KeyboardButton(name) for name in['Бижутерия']])
keyboard.add(*[types.KeyboardButton(name) for name in['Чат с оператором']])
keyboard.add(*[types.KeyboardButton(name) for name in['FAQ']])
bot.send_message(message.chat.id, 'Выберите тип товара', reply_markup=keyboard, parse_mode="Html")
Answer the question
In order to leave comments, you need to log in
keyboard = types.ReplyKeyboardMarkup(one_time_keyboard=True, resize_keyboard=True)
clothes = types.KeyboardButton(text = 'Clothes')
snikers = types.KeyboardButton(text = 'Shoes')
bags = types.KeyboardButton(text = 'Bags')
keyboard.add(clothes, snikers, bags)
bot.send_message(message.chat.id, 'Select item type', reply_markup=keyboard, parse_mode="Html")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question