From b8f39725c50d4ec1625268882e0bf5e1900a5383 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 24 Apr 2022 11:56:07 +0200 Subject: [PATCH] Remove outdated FAQ --- docs/source/faq/index.rst | 2 -- ...-event-handler-triggered-twice-or-more.rst | 28 ------------------- 2 files changed, 30 deletions(-) delete mode 100644 docs/source/faq/why-is-the-event-handler-triggered-twice-or-more.rst diff --git a/docs/source/faq/index.rst b/docs/source/faq/index.rst index 0b165349..e5bef2be 100644 --- a/docs/source/faq/index.rst +++ b/docs/source/faq/index.rst @@ -17,7 +17,6 @@ This FAQ page provides answers to common questions about Pyrogram and, to some e - :doc:`code-hangs-when-calling-stop-restart-add-remove-handler` - :doc:`unicodeencodeerror-codec-cant-encode` - :doc:`uploading-with-urls-gives-error-webpage-curl-failed` -- :doc:`why-is-the-event-handler-triggered-twice-or-more` - :doc:`sqlite3-operationalerror-database-is-locked` - :doc:`sqlite3-interfaceerror-error-binding-parameter` - :doc:`socket-send-raised-exception-oserror-timeouterror` @@ -39,7 +38,6 @@ This FAQ page provides answers to common questions about Pyrogram and, to some e code-hangs-when-calling-stop-restart-add-remove-handler unicodeencodeerror-codec-cant-encode uploading-with-urls-gives-error-webpage-curl-failed - why-is-the-event-handler-triggered-twice-or-more sqlite3-operationalerror-database-is-locked sqlite3-interfaceerror-error-binding-parameter socket-send-raised-exception-oserror-timeouterror diff --git a/docs/source/faq/why-is-the-event-handler-triggered-twice-or-more.rst b/docs/source/faq/why-is-the-event-handler-triggered-twice-or-more.rst deleted file mode 100644 index ada12f1d..00000000 --- a/docs/source/faq/why-is-the-event-handler-triggered-twice-or-more.rst +++ /dev/null @@ -1,28 +0,0 @@ -Why is the event handler called twice or more? -============================================== - -The event handler is being called twice or more because one or more message edit events have arrived. -By default, Pyrogram listens to both new and edit message events inside ``on_message`` handlers. To prevent edit events -from calling the handler, use the "not edited" filter ``~filters.edited``. - -For example: - -.. code-block:: python - - ... - - @app.on_message(... & ~filters.edited) - async def handler(client, message): - ... - -Or, avoid handling any edited message altogether this way: - -.. code-block:: python - - ... - - @app.on_message(filters.edited) - async def edited(client, message): - pass - - ... # other handlers \ No newline at end of file