Skip to content

Keyboard

Misol

import telebot
from telebot import types

bot = telebot.TeleBot("TOKEN")

# keyboard
@bot.message_handler(commands=['keyboard'])
def keyboard(message):
    keyboard_ = types.ReplyKeyboardMarkup(resize_keyboard=True, row_width=1)
    keyboard_.add(types.KeyboardButton(text="1"), types.KeyboardButton(text="2"))
    keyboard_.add(types.KeyboardButton(text="3"))
    bot.send_message(
        chat_id=message.chat.id,
        text="Klavyatura",
        parse_mode='html',
        reply_markup=keyboard_
    )