J
J
Jagetone2021-11-28 20:09:17
Python
Jagetone, 2021-11-28 20:09:17

If doesn't want to work?

import telebot
style = ''
bot = telebot.TeleBot(token)
@bot.message_handler(content_types=['text'])

def start_message(message):
    start_keyboard = telebot.types.ReplyKeyboardMarkup(True)
    start_keyboard.row("Оставить заявку")
    start_keyboard.row("Тех. поддержка", "FAQ", "Оставить отзыв")
    bot.send_message(message.chat.id, "Здравствуйте!", reply_markup=start_keyboard)
    if message.text.lower() == "оставить заявку":
        start_request(message)

def start_request(message):
    second_keyboard = telebot.types.ReplyKeyboardMarkup(True)
    second_keyboard.row("Подсобная работа", "Услуга грузчика")
    second_keyboard.row("Уборщик", "Земельные работы")
    second_keyboard.row("Другое")
    bot.send_message(message.chat.id, text="Укажите тип работы", reply_markup=second_keyboard)
    if message.text.lower() == 'другое':
        bot.send_message(message.chat.id, "Распишите подробнее, что вам нужно")

For some reason if does not want to work)
after entering "other" returns to the initial function, and does not write: "Describe in more detail what you need"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question