import telebot
from telebot import types
token=''
bot = telebot.TeleBot(token)
@bot.message_handler(commands=['start'])
def start_message(message):
markup= types.ReplyKeyboardMarkup(resize_keyboard=True)
item1 = types.KeyboardButton('*')
item2 = types.KeyboardButton('**')
markup.add(item1, item2)
bot.send_message(message.chat.id, 'Привет {0.first_name}' .format(message.from_user), reply_markup= markup)
@bot.message_handler(content_types=['text'])
def start_message(message):
if message.chat.type == 'private':
if message.text == '*':
markup= types.ReplyKeyboardMarkup(resize_keyboard=True)
item1 = types.KeyboardButton('1')
item2 = types.KeyboardButton('2')
markup.add(item1, item2)
bot.infinity_polling()