mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 14:04:51 +00:00
Update get_history docstrings
This commit is contained in:
parent
04542dbddf
commit
fbc18cace0
1 changed files with 3 additions and 2 deletions
|
|
@ -31,9 +31,10 @@ class GetHistory(BaseClient):
|
||||||
offset_id: int = 0,
|
offset_id: int = 0,
|
||||||
offset_date: int = 0,
|
offset_date: int = 0,
|
||||||
reverse: bool = False):
|
reverse: bool = False):
|
||||||
"""Use this method to retrieve the history of a chat.
|
"""Use this method to retrieve a chunk of the history of a chat.
|
||||||
|
|
||||||
You can get up to 100 messages at once.
|
You can get up to 100 messages at once.
|
||||||
|
For a more convenient way of getting a chat history see :meth:`iter_history`.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
chat_id (``int`` | ``str``):
|
chat_id (``int`` | ``str``):
|
||||||
|
|
@ -72,7 +73,7 @@ class GetHistory(BaseClient):
|
||||||
peer=self.resolve_peer(chat_id),
|
peer=self.resolve_peer(chat_id),
|
||||||
offset_id=offset_id,
|
offset_id=offset_id,
|
||||||
offset_date=offset_date,
|
offset_date=offset_date,
|
||||||
add_offset=offset - (limit if reverse else 0),
|
add_offset=offset * (-1 if reverse else 1) - (limit if reverse else 0),
|
||||||
limit=limit,
|
limit=limit,
|
||||||
max_id=0,
|
max_id=0,
|
||||||
min_id=0,
|
min_id=0,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue