def change_time(message): if check_info_string(message.from_user.id, FIELDNAME_QUESTION_TIME, message.text): bot.send_message(message.from_user.id, got_it_string) else: bot.send_message(message.from_user.id, something_went_wrong_string) bot.register_next_step_handler(message, change_time)
def get_age(message): if check_info_string(message.from_user.id, FIELDNAME_AGE, message.text): bot.send_message(message.from_user.id, got_it_string) bot.send_message(message.from_user.id, give_me_city_string) bot.register_next_step_handler(message, get_city) else: bot.send_message(message.from_user.id, something_went_wrong_string) bot.register_next_step_handler(message, get_age)
def get_timezone(message): if check_info_string(message.from_user.id, FIELDNAME_TIMEZONE, message.text): bot.send_message(message.from_user.id, got_it_string) bot.send_message(message.from_user.id, give_me_time_string) bot.register_next_step_handler(message, get_time) else: bot.send_message(message.from_user.id, something_went_wrong_string) bot.register_next_step_handler(message, get_timezone)
def get_time(message): if check_info_string(message.from_user.id, FIELDNAME_QUESTION_TIME, message.text): bot.send_message(message.from_user.id, got_it_string) bot.send_message(message.from_user.id, give_me_info_string, reply_markup=keyboard_yesno) else: bot.send_message(message.from_user.id, something_went_wrong_string) bot.register_next_step_handler(message, get_time)