Document iteration order

This commit is contained in:
Lonami Exo 2019-06-28 20:44:06 +02:00
parent 84c4fcdec6
commit 9322c37a94
3 changed files with 15 additions and 0 deletions

View File

@ -359,6 +359,8 @@ class ChatMethods:
"""
Iterator over the participants belonging to the specified chat.
The order is unspecified.
Arguments
entity (`entity`):
The entity from which to retrieve the participants list.
@ -470,6 +472,8 @@ class ChatMethods:
"""
Iterator over the admin log for the specified channel.
The default order is from the most recent event to to the oldest.
Note that you must be an administrator of it to use this method.
If none of the filters are present (i.e. they all are ``None``),
@ -613,6 +617,8 @@ class ChatMethods:
"""
Iterator over a user's profile photos or a chat's photos.
The order is from the most recent photo to the oldest.
Arguments
entity (`entity`):
The entity from which to get the profile or chat photos.

View File

@ -127,6 +127,10 @@ class DialogMethods:
"""
Iterator over the dialogs (open conversations/subscribed channels).
The order is the same as the one seen in official applications
(first pinned, them from those with the most recent message to
those with the oldest message).
Arguments
limit (`int` | `None`):
How many dialogs to be retrieved as maximum. Can be set to
@ -227,6 +231,8 @@ class DialogMethods:
"""
Iterator over all open draft messages.
The order is unspecified.
Yields
Instances of `Draft <telethon.tl.custom.draft.Draft>`.

View File

@ -315,6 +315,9 @@ class MessageMethods:
"""
Iterator over the messages for the given chat.
The default order is from newest to oldest, but this
behaviour can be changed with the `reverse` parameter.
If either `search`, `filter` or `from_user` are provided,
:tl:`messages.Search` will be used instead of :tl:`messages.getHistory`.