Answer the question
In order to leave comments, you need to log in
Incorrect display of the ReplyKeyboardMarkup string. How to change line height and make text wrap automatically?
Good day to all.
I am writing a telegram bot using the telegrambotapi library.
When prompted by an ambiguous user, a keyboard should appear (as a list) with all possible options. Everything works, but there is a catch: this is a reduction in text.
Custom keyboard abbreviation on Android devices is abbreviated by adding an ellipsis to the end of the line, this is quite tolerable, but on iOS devices the ellipsis is placed in the center of the sentence, which makes the line less informative.
How can I manually change the height of each button in the keyboard, and how can I automatically wrap the text in this keyboard cell?
markup = types.ReplyKeyboardMarkup(one_time_keyboard=True)
for line in result[0]:
markup.row(f'{line}')
bot.send_message(message.chat.id, "Варианты:", reply_markup=markup, disable_notification=True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question