title: How to change inline bot handler in Telegram
body: <p>I followed <a href="https://github.com/python-telegram-bot/python-telegram-bot/wiki/Extensions-%E2%80%93-Your-first-Bot" rel="nofollow noreferrer">this tutorial</a> and created a telegram bot. I enabled inline mode and created inline query handler using this code:</p>
  
  <pre><code>from telegram import InlineQueryResultArticle, InputTextMessageContent
  def inline_caps(update, context):
      query = update.inline_query.query
      if not query:
          return
      results = list()
      results.append(
          InlineQueryResultArticle(
              id=query.upper(),
              title='Caps',
              input_message_content=InputTextMessageContent(query.upper())
          )
      )
      context.bot.answer_inline_query(update.inline_query.id, results)
  
  from telegram.ext import InlineQueryHandler
  inline_caps_handler = InlineQueryHandler(inline_caps)
  dispatcher.add_handler(inline_caps_handler)
  </code></pre>
  
  <p>I numerous times I tried to change this inline query handler, but nothing works. This doesn't work:</p>
  
  <p>dispatcher.<a href="https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.dispatcher.html#telegram.ext.Dispatcher.remove_handler" rel="nofollow noreferrer">remove_handler</a>(inline_caps_handler) </p>
  
  <p>I also tried to diable inline mode and then enable it again using BotFather, but the old handler still stays untouched in site of reactivating inline mode. </p>
  
  <p>Creating a new handler and adding it doesn't work also.</p>