mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Remove outdated FAQ
This commit is contained in:
parent
1e66ac2636
commit
b8f39725c5
@ -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
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user