@bot.message_handler(func=lambda mess: "Продукция1" == mess.text, content_types=['text'])
def handle_text(message):
keyboard = types.ReplyKeyboardMarkup(row_width=2, resize_keyboard=True, one_time_keyboard=False)
cid = message.chat.id
keyboard.row("Товар1")
keyboard.row("Товар2")
keyboard.row("Товар3")
keyboard.row("Товар4")
keyboard.row("Товар5")
keyboard.row("Товар6")
keyboard.row("Товар7")
keyboard.row("Товар8")
keyboard.row("Товар9")
keyboard.row("Товар10")
keyboard.row("Товар11")
keyboard.row("Товар12")
bot.send_message(message.from_user.id, "Выберите товар", reply_markup=keyboard)
@bot.message_handler(func=lambda mess: "Товар1" == mess.text or "Товар2" == mess.text
or "Товар3" == mess.text or "Товар4" == mess.text or "Товар5" == mess.text
or "Товар6" == mess.text or "Товар7" == mess.text or "Товар8" == mess.text
or "Товар9" == mess.text or "Товар10" == mess.text or "Товар11" == mess.text or "Товар12" == mess.text, content_types=['text'])
def handle_text(message):
key = types.ReplyKeyboardMarkup(row_width=2, resize_keyboard=True, one_time_keyboard=False)
if message.text == "Товар1":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар2":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар3":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар4":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар5":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар6":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар7":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар8":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар9":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар10":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар11":
bot.send_message(message.chat.id, "", reply_markup=key)
if message.text == "Товар12":
bot.send_message(message.chat.id, "", reply_markup=key)
goods = ['Товар1', 'Товар2', 'Товар3', 'Товар4', 'Товар5', 'Товар6', 'Товар7', 'Товар8', 'Товар9', 'Товар10', 'Товар11', 'Товар12']
@bot.message_handler(func=lambda mess: "Продукция1" == mess.text, content_types=['text'])
def handle_text(message):
keyboard = types.ReplyKeyboardMarkup(row_width=2, resize_keyboard=True, one_time_keyboard=False)
for goods_item in goods:
keyboard.row(goods_item)
bot.send_message(message.from_user.id, "Выберите товар", reply_markup=keyboard)
@bot.message_handler(func=lambda mess: mess.text in goods, content_types=['text'])
def handle_text(message):
keyboard = types.ReplyKeyboardMarkup(row_width=2, resize_keyboard=True, one_time_keyboard=False)
if message.text in goods:
bot.send_message(message.chat.id, "", reply_markup=keyboard )