From 32336a9bda2bb7b6be54561ab2d8bee3a28e6cee Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 2 May 2018 16:00:48 +0200 Subject: [PATCH] Fix links --- docs/source/resources/UpdateHandling.rst | 9 +++++---- pyrogram/client/filters/filters.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/source/resources/UpdateHandling.rst b/docs/source/resources/UpdateHandling.rst index 2b2c05d9..4373433b 100644 --- a/docs/source/resources/UpdateHandling.rst +++ b/docs/source/resources/UpdateHandling.rst @@ -5,14 +5,15 @@ Updates are events that happen in your Telegram account (incoming messages, new and are handled by registering one or more callback functions with an Handler. There are multiple Handlers to choose from, one for each kind of update: -- `MessageHandler <../pyrogram/MessageHandler.html>`_ -- `RawUpdateHandler <../pyrogram/RawUpdateHandler.html>`_ +- `MessageHandler <../pyrogram/handlers/MessageHandler.html>`_ +- `CallbackQueryHandler <../pyrogram/handlers/CallbackQueryHandler.html>`_ +- `RawUpdateHandler <../pyrogram/handlers/RawUpdateHandler.html>`_ Registering an Handler ---------------------- We shall examine the :obj:`MessageHandler `, which will be in charge for handling -:obj:`Message ` objects. +:obj:`Message ` objects. - The easiest and nicest way to register a MessageHandler is by decorating your function with the :meth:`on_message() ` decorator. Here's a full example that prints out the content @@ -59,7 +60,7 @@ For a finer grained control over what kind of messages will be allowed or not in :class:`Filters `. - This example will show you how to **only** handle messages containing an - :obj:`Audio ` object and filter out any other message: + :obj:`Audio ` object and filter out any other message: .. code-block:: python diff --git a/pyrogram/client/filters/filters.py b/pyrogram/client/filters/filters.py index 178e483a..de59d083 100644 --- a/pyrogram/client/filters/filters.py +++ b/pyrogram/client/filters/filters.py @@ -38,7 +38,7 @@ class Filters: outgoing = build("Outgoing", lambda _, m: m.outgoing) """Filter outgoing messages.""" - text = build("Text", lambda _, m: bool(m.text and not m.text.startswith("/"))) + text = build("Text", lambda _, m: bool(m.text)) """Filter text messages.""" reply = build("Reply", lambda _, m: bool(m.reply_to_message))