title: How to log ONLY chosen inline result article - Python Telegram Bot
body: <p>I have written a simple script that allows people to write caps texts with my inline bot.</p>
  
  <p><code>def inline_caps(bot, update):
      nick=update.inline_query.from_user.username
      query = update.inline_query.query
      try:
          if not query:
              return
          results = list()
          results.append(InlineQueryResultArticle(id=query.upper(),title="Formatta in maiuscolo", input_message_content=InputTextMessageContent(query.upper())))
          bot.answerInlineQuery(update.inline_query.id, results)
          log.a((nick)+" ha formattato un testo")
      except Exception as err:
          log.e(err)</code></p>
  
  <p>I log everything with a logger made by a friend, you can find it <a href="https://github.com/KaikyuDev/KaiDesktop/blob/master/Logger.py" rel="nofollow noreferrer">here</a>.
  The problem is that it logs really everything, even if an user only writes "@name_bot t" without choosing to caps it. How can I log ONLY the chosen result?</p>
  
  <p>If you need them, here are my imports:</p>
  
  <p><code>from telegram.ext import Updater, Filters, CommandHandler, MessageHandler, InlineQueryHandler, ChosenInlineResultHandler
  from telegram import Chat, ParseMode, InlineQueryResultArticle, InputTextMessageContent
  import os, math, time, re, random
  from time import strftime
  from pprint import pprint
  import Logger as log
  from uuid import uuid4</code></p>
  
  <p>And here are my dispatchers:</p>
  
  <pre><code>    dp = updater.dispatcher
  # Comandi vari:
  dp.add_handler(CommandHandler("start", start))
  dp.add_handler(CommandHandler("help", help))
  dp.add_handler(CommandHandler("id", id))
  dp.add_handler(CommandHandler("groupid", groupid))
  # Quindi: dp.add_handler(CommandHandler("comando", funzione))
  dp.add_handler(CommandHandler("info", info))
  # Filtri vari
  dp.add_handler(MessageHandler(Filters.text, reader))
  dp.add_handler(MessageHandler(Filters.audio, ext_audio))
  dp.add_handler(MessageHandler(Filters.photo, ext_photo))
  # Funzionalità inline
  inline_caps_handler = InlineQueryHandler(inline_caps)
  result_handler = ChosenInlineResultHandler(say_hello)
  dp.add_handler(inline_caps_handler)
  dp.add_handler(result_handler)
  </code></pre>
  
  <p>What should I do?</p>