import telebot
from telebot import types
client = telebot.TeleBot("1963852427:AAFuzigy74HooXQk9XolCB3SPuZalEo1A")
@client.message_handler(commands="start")
def start (message):
button = types.ReplyKeyboardMarkup (resize_keyboard = True)
item1 = types.KeyboardButton ("начать")
button.add(item1)
client.send_message(message.chat.id, "Привет,{0.first_name}".format(message.from_user), reply_markup=button)
@client.message_handler(content_types="text")
def send_message (message):
if message.chat.type == "private":
if message.text == "начать":
button = types.ReplyKeyboardMarkup(resize_keyboard=True)
item1 = types.KeyboardButton("Один")
item2 = types.KeyboardButton("Два")
item3 = types.KeyboardButton("Три")
item4 = types.KeyboardButton("Четыре")
button.add(item1, item2, item3, item4)
client.send_message(message.chat.id, "Выберите число", reply_markup=button)
@client.message_handler(content_types="text")
def lalala (message):
if message.text == "Один":
client.send_message(message.chat.id, "1")
client.polling (none_stop = True)