From 377dc0cc468c03e3a0605d6eec0741401f98ab33 Mon Sep 17 00:00:00 2001 From: Hinrich Mahler Date: Thu, 17 Dec 2020 18:47:12 +0100 Subject: [PATCH] Update ptb example --- readthedocs/concepts/botapi-vs-mtproto.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readthedocs/concepts/botapi-vs-mtproto.rst b/readthedocs/concepts/botapi-vs-mtproto.rst index 8c2f9479..cddb52d0 100644 --- a/readthedocs/concepts/botapi-vs-mtproto.rst +++ b/readthedocs/concepts/botapi-vs-mtproto.rst @@ -88,7 +88,7 @@ Next, we will see some examples from the most popular libraries. Migrating from python-telegram-bot ---------------------------------- -Let's take their `echobot2.py`_ example and shorten it a bit: +Let's take their `echobot.py`_ example and shorten it a bit: .. code-block:: python @@ -107,7 +107,7 @@ Let's take their `echobot2.py`_ example and shorten it a bit: updater = Updater("TOKEN") dp = updater.dispatcher dp.add_handler(CommandHandler("start", start)) - dp.add_handler(MessageHandler(Filters.text, echo)) + dp.add_handler(MessageHandler(Filters.text & ~Filters.command, echo)) updater.start_polling() @@ -330,4 +330,4 @@ Key differences: .. _aiohttp: https://docs.aiohttp.org/en/stable .. _aiogram: https://aiogram.readthedocs.io .. _dumbot: https://github.com/Lonami/dumbot -.. _echobot2.py: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/echobot2.py +.. _echobot.py: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/echobot.py