Exemplo n.º 1
0
def part_3_question_5_1_handler(update: Update,
                                context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question5')
    text = 'Что вас мотивирует, а что останавливает?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_3_QUESTION_5_1_STATE
Exemplo n.º 2
0
def part_3_question_4_2_handler(update: Update,
                                context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question4_1')
    text = 'Чем пользовались чтобы узнать это число?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_3_QUESTION_4_2_STATE
Exemplo n.º 3
0
def part_4_question_4_1_handler(update: Update,
                                context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question4')
    text = 'Как находили правильный перевод?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_4_QUESTION_4_1_STATE
Exemplo n.º 4
0
def part_4_question_11_handler(update: Update,
                               context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question10')
    text = 'Отслеживаете текущее количество известных слов? Если да, то как?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_4_QUESTION_11_STATE
Exemplo n.º 5
0
def part_4_question_12_handler(update: Update,
                               context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question11')
    text = 'Что вас *мотивирует* изучать новый язык?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_4_QUESTION_12_STATE
Exemplo n.º 6
0
def part_4_question_10_handler(update: Update,
                               context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question9')
    text = 'Как отслеживаете свой *текущий уровень* в изучении нового языка?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_4_QUESTION_10_STATE
Exemplo n.º 7
0
def part_1_question_3_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question2')
    text = 'Как убеждаетесь в правильном смысле перевода? Бывает ли так, что уместный перевод не сразу находится?'
    message.reply_text(text)
    context.user_data['state'] = states.PART_1_QUESTION_3_STATE
    return states.PART_1_QUESTION_3_STATE
Exemplo n.º 8
0
def part_3_question_4_1_handler(update: Update,
                                context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question4')
    text = 'Сколько примерно слов сейчас знаете?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_3_QUESTION_4_1_STATE
Exemplo n.º 9
0
def part_3_question_5_2_handler(update: Update,
                                context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question5_1')
    text = 'Как думаете, вам поможет знание двух языков в изучении третьего? Если да, то чем?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_3_QUESTION_5_2_STATE
Exemplo n.º 10
0
def part_4_question_4_2_handler(update: Update,
                                context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question4_1')
    text = 'Что помогает найти правильный смысл слова?'
    message.reply_text(text, parse_mode='Markdown')
    context.user_data['state'] = states.PART_4_QUESTION_4_2_STATE
    return states.PART_4_QUESTION_4_2_STATE
Exemplo n.º 11
0
def part_4_question_8_no_1_handler(update: Update,
                                   context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question8')
    text = 'Как узнаете смысл слова? Переводите обычно только на свой родной язык или как-то иначе?'
    message.reply_text(text, parse_mode='Markdown')
    context.user_data['state'] = states.PART_4_QUESTION_8_NO_1_STATE
    return states.PART_4_QUESTION_8_NO_1_STATE
Exemplo n.º 12
0
def part_1_question_4_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question1')

    text = 'Эх, тогда вопросов больше нет :) Расскажите, на ваш взгляд, как эффективней запоминать слова иностранного язык?'
    message.reply_text(text)
    context.user_data['state'] = states.PART_1_QUESTION_4_STATE
    return states.PART_1_QUESTION_4_STATE
Exemplo n.º 13
0
def part_3_question_4_3_handler(update: Update,
                                context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question4_2')
    text = 'Продолжаете набирать словарный запас?'
    message.reply_text(text, parse_mode='Markdown')
    context.user_data['state'] = states.PART_3_QUESTION_4_3_STATE
    return states.PART_3_QUESTION_4_3_STATE
Exemplo n.º 14
0
def part_3_question_5_3_handler(update: Update,
                                context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question5_2')
    text = 'С чего начнёте учить новый язык?'
    message.reply_text(text, parse_mode='Markdown')
    context.user_data['state'] = states.PART_3_QUESTION_5_3_STATE
    return states.PART_3_QUESTION_5_3_STATE
Exemplo n.º 15
0
def part_4_question_8_yes_1_handler(update: Update,
                                    context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question8')
    text = 'Чем полезно проверять перевод нового слова сразу на несколько языков?'
    message.reply_text(text, parse_mode='Markdown')
    context.user_data['state'] = states.PART_4_QUESTION_8_YES_1_STATE
    return states.PART_4_QUESTION_8_YES_1_STATE
Exemplo n.º 16
0
def part_4_question_5_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    if context.user_data['state'] == states.PART_4_QUESTION_4_STATE:
        answerHelper.save_answer(message, context, 'question4')
    elif context.user_data['state'] == states.PART_4_QUESTION_4_2_STATE:
        answerHelper.save_answer(message, context, 'question4_2')

    text = 'Какие *методики/приложения* используете чтобы запоминать новые слова?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_4_QUESTION_5_STATE
Exemplo n.º 17
0
def part_3_question_4_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question3')
    text = 'Когда-нибудь проверяли сколько вы знаете слов?'
    reply_keyboard = [['Да', 'Нет']]
    keyboard_markup = ReplyKeyboardMarkup(reply_keyboard,
                                          one_time_keyboard=True)
    message.reply_text(text, reply_markup=keyboard_markup)
    context.user_data['state'] = states.PART_3_QUESTION_4_STATE
    return states.PART_3_QUESTION_4_STATE
Exemplo n.º 18
0
def part_3_question_6_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    if context.user_data['state'] == states.PART_3_QUESTION_5_3_STATE:
        answerHelper.save_answer(message, context, 'question5_3')
    elif context.user_data['state'] == states.PART_3_QUESTION_5_STATE:
        answerHelper.save_answer(message, context, 'question5')

    text = 'Какой мотивации не хватает чтобы начать изучать новый язык?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_3_QUESTION_6_STATE
Exemplo n.º 19
0
def part_4_question_9_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    if context.user_data['state'] == states.PART_4_QUESTION_8_YES_1_STATE:
        answerHelper.save_answer(message, context, 'question8_yes_1')
    elif context.user_data['state'] == states.PART_4_QUESTION_8_NO_1_STATE:
        answerHelper.save_answer(message, context, 'question8_no_1')

    text = 'Что бы хотели улучшить, *сделать более эффективным*, в процессе изучения языка?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_4_QUESTION_9_STATE
Exemplo n.º 20
0
def part_4_question_8_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question7')
    text = 'Проверяете ли значение нового слова переводя на разные известные вам языки?'
    reply_keyboard = [['Да', 'Нет']]
    keyboard_markup = ReplyKeyboardMarkup(reply_keyboard,
                                          one_time_keyboard=True)
    message.reply_text(text, reply_markup=keyboard_markup)
    context.user_data['state'] = states.PART_4_QUESTION_8_STATE
    return states.PART_4_QUESTION_8_STATE
Exemplo n.º 21
0
def part_3_survey_finish_handler(update: Update,
                                 context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question6')
    text = messageTextProvider.get_survey_finish_state_text()
    reply_keyboard = [['Да', 'Нет']]
    keyboard_markup = ReplyKeyboardMarkup(reply_keyboard,
                                          one_time_keyboard=True)
    message.reply_text(text, reply_markup=keyboard_markup)
    context.user_data['state'] = states.SURVEY_FINISH_STATE
    return states.SURVEY_FINISH_STATE
Exemplo n.º 22
0
def part_4_question_4_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question3')
    text = 'Бывают *сложности с поиском* правильного смысла перевода?'
    reply_keyboard = [['Да', 'Нет']]
    keyboard_markup = ReplyKeyboardMarkup(reply_keyboard,
                                          one_time_keyboard=True)
    message.reply_text(text,
                       parse_mode='Markdown',
                       reply_markup=keyboard_markup)
    context.user_data['state'] = states.PART_4_QUESTION_4_STATE
    return states.PART_4_QUESTION_4_STATE
Exemplo n.º 23
0
def total_finish_handler(update: Update, context: CallbackContext) -> int:
    if context.user_data['state'] == states.PLANS_INFO_STATE:
        answerHelper.save_answer(update.message, context, 'final1')
    else:
        answerHelper.set_empty_answer(context.user_data, 'final1')

    answerHelper.save_user_answers_to_file(update.effective_user,
                                           context.user_data)

    text = 'Теперь точно всё :) Спасибо и до скорых встреч!'
    helpers.get_message(update).reply_text(text,
                                           reply_markup=ReplyKeyboardRemove())
    return ConversationHandler.END
Exemplo n.º 24
0
def part_3_question_5_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    if context.user_data['state'] == states.PART_3_QUESTION_4_3_STATE:
        answerHelper.save_answer(message, context, 'question4_3')
    elif context.user_data['state'] == states.PART_3_QUESTION_4_STATE:
        answerHelper.save_answer(message, context, 'question4')

    text = 'Планируете изучать новый язык?'
    reply_keyboard = [['Да', 'Нет']]
    keyboard_markup = ReplyKeyboardMarkup(reply_keyboard,
                                          one_time_keyboard=True)
    message.reply_text(text, reply_markup=keyboard_markup)
    context.user_data['state'] = states.PART_3_QUESTION_5_STATE
    return states.PART_3_QUESTION_5_STATE
Exemplo n.º 25
0
def part_1_question_2_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question1')
    text = 'Где *ищете перевод* иностранного слова?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_1_QUESTION_2_STATE
Exemplo n.º 26
0
def part_2_question_4_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question3')
    text = 'Бывают *сложности с поиском* правильного смысла перевода?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_2_QUESTION_4_STATE
Exemplo n.º 27
0
def part_3_question_3_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question2')
    text = 'Как убеждались в правильном смысле перевода? Бывает ли так, что уместный перевод не сразу находится?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_3_QUESTION_3_STATE
Exemplo n.º 28
0
def part_2_question_5_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question4')
    text = 'Что бы хотели улучшить, *сделать более эффективным*, в процессе изучения языка?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_2_QUESTION_5_STATE
Exemplo n.º 29
0
def part_4_question_6_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question5')
    text = 'Какие еще *инструменты* используете для изучения языка в целом?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_4_QUESTION_6_STATE
Exemplo n.º 30
0
def part_2_question_3_handler(update: Update, context: CallbackContext) -> int:
    message = helpers.get_message(update)
    answerHelper.save_answer(message, context, 'question2')
    text = 'Какие *методики/приложения* используете для запоминания новых слов?'
    message.reply_text(text, parse_mode='Markdown')
    return states.PART_2_QUESTION_3_STATE