Help me write the code on TelegramBotAPI and now he's writing buttons and he's not putting the button on the screen. I don't know.
-
import os import telebot bot = telebot.TeleBot('TOKEN') @bot.message_handler(content_types=["text"]) def start(bot): keyboard = [['RU', 'EN']] message = "Hey, I'm Bot! / Привет я бот Please select a language to start. / Выбери язык для старта \ para comenzar." reply_markup = ReplyKeyboardMarkup(keyboard,one_time_keyboard=True,resize_keyboard=True) update.message.reply_text(message, reply_markup=reply_markup) return SET_LANG try: bot.polling(none_stop=True, interval=0) except Exception: pass
-
The buttons are constructed as follows:
markup = types.ReplyKeyboardMarkup(resize_keyboard=True) item1 = types.KeyboardButton("название кнопки") markup.add(item1)