mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 02:43:45 +03:00
Document get_messages has no default limit
This commit is contained in:
parent
bf3e3d8797
commit
c9006024e2
|
@ -93,7 +93,7 @@ For more information, see the :doc:`/concepts/datacenters` concept.
|
|||
AttributeError: 'coroutine' object has no attribute 'id'
|
||||
--------------------------------------------------------
|
||||
|
||||
Telethon is an asynchronous library, which means you must ``await`` calls that require network access:
|
||||
Telethon is an asynchronous library, which means you must :keyword:`await` calls that require network access:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
|
@ -825,6 +825,12 @@ class Client:
|
|||
:param limit:
|
||||
How many messages to fetch at most.
|
||||
|
||||
.. caution::
|
||||
|
||||
By default, there is no limit, so the method will fetch all messages.
|
||||
This means :keyword:`await` may appear to hang if there are thousands of messages in the chat.
|
||||
You can either set a smaller limit or use the ``async for`` syntax instead.
|
||||
|
||||
:param offset_id:
|
||||
Start getting messages with an identifier lower than this one.
|
||||
This means only messages older than the message with ``id = offset_id`` will be fetched.
|
||||
|
@ -1291,6 +1297,10 @@ class Client:
|
|||
:param limit:
|
||||
How many messages to fetch at most.
|
||||
|
||||
.. note::
|
||||
|
||||
Like :meth:`get_messages`, there is no limit by default, so :keyword:`await` may appear to hang.
|
||||
|
||||
:param query:
|
||||
Text query to use for fuzzy matching messages.
|
||||
The rules for how "fuzzy" works are an implementation detail of the server.
|
||||
|
@ -1335,6 +1345,10 @@ class Client:
|
|||
:param limit:
|
||||
How many messages to fetch at most.
|
||||
|
||||
.. note::
|
||||
|
||||
Like :meth:`get_messages`, there is no limit by default, so :keyword:`await` may appear to hang.
|
||||
|
||||
:param query:
|
||||
Text query to use for fuzzy matching messages.
|
||||
The rules for how "fuzzy" works are an implementation detail of the server.
|
||||
|
|
Loading…
Reference in New Issue
Block a user