= User(name) user_dict[chat_id] = user msg = bot.reply_to(message, 'How old are you?') bot.register_next_step_handler(msg, process_age_step) except Exception as e: bot.reply_to(message, 'oooops') def process_age_step(message): try: chat_id = message.chat.id age = message.text if not age.isdigit(): msg = bot.reply_to(message, 'Age should be a number. How old are you?') bot.register_next_step_handler(msg, process_age_step) return user = user_dict[chat_id] user.age = age markup = types.ReplyKeyboardMarkup(one_time_keyboard=True) markup.add('Male', 'Female') msg = bot.reply_to(message, 'What is your gender', reply_markup=markup) bot.register_next_step_handler(msg, process_sex_step) except Exception as e: bot.reply_to(message, 'oooops')
а можно с удержанием таубуляции?
Здесь инлайн кнопок нет 🧐
Обсуждают сегодня