def talk_to_me(bot, update, user_data):
    emo = get_user_emo(user_data)
    user_text = "Привет,{} {}! Ты написал: {}".format(
        update.message.chat.first_name, emo, update.message.text)
    logging.info("User: %s, Chat id: %s, Message: %s",
                 update.message.chat.username, update.message.chat.id,
                 update.message.text)
    update.message.reply_text(user_text, reply_markup=get_keyboard())
def anketa_skip_comment(bot, update, user_data):
    text = """

<b>Фамилия Имя: </b> {anketa_name}
<b>Оценка: </b> {anketa_rating}""".format(**user_data)
    update.message.reply_text(text,
                              reply_markup=get_keyboard(),
                              parse_mode=ParseMode.HTML)
    return ConversationHandler.END
def get_location(bot, update, user_data):
    print(update.message.location)
    update.message.reply_text('Спасибо, {}.'.format(get_user_emo(user_data)),
                              reply_markup=get_keyboard())
def get_contact(bot, update, user_data):
    print(update.message.contact)
    update.message.reply_text('Спасибо, {}.'.format(
        update.message.chat.first_name),
                              reply_markup=get_keyboard())
def change_avatar(bot, update, user_data):
    if 'emo' in user_data:
        del user_data['emo']
    emo = get_user_emo(user_data)
    update.message.reply_text('Готово: {}'.format(emo),
                              reply_markup=get_keyboard())
def send_cat_picture(bot, update, user_data):
    cat_list = glob('images/cat*jp*g')
    cat_pic = choice(cat_list)
    bot.send_photo(chat_id=update.message.chat.id,
                   photo=open(cat_pic, 'rb'),
                   reply_markup=get_keyboard())
def greet_user(bot, update, user_data):
    print(update.message.chat_id)
    emo = get_user_emo(user_data)
    user_data['emo'] = emo
    text = 'Привет {}'.format(emo)
    update.message.reply_text(text, reply_markup=get_keyboard())