Skip to content

Commit 48d4230

Browse files
committed
Update get_messages documentation
Follow-Up: #116
1 parent 7b85393 commit 48d4230

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pyrogram/methods/messages/get_messages.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
class GetMessages:
3333
async def get_messages(
3434
self: "pyrogram.Client",
35+
*,
3536
chat_id: Union[int, str] = None,
3637
message_ids: Union[int, Iterable[int]] = None,
3738
reply_to_message_ids: Union[int, Iterable[int]] = None,
@@ -49,10 +50,10 @@ async def get_messages(
4950
5051
.. include:: /_includes/usable-by/users-bots.rst
5152
52-
You must use exactly one of ``chat_id`` OR ``link``.
53+
You must use exactly one of ``message_ids`` OR (``chat_id``, ``message_ids``) OR (``chat_id``, ``reply_to_message_ids``) OR ``link``.
5354
5455
Parameters:
55-
chat_id (``int`` | ``str``):
56+
chat_id (``int`` | ``str``, *optional*):
5657
Unique identifier (int) or username (str) of the target chat.
5758
For your personal cloud (Saved Messages) you can simply use "me" or "self".
5859
For a contact that exists in your Telegram address book you can use his phone number (str).
@@ -221,4 +222,4 @@ async def get_messages(
221222
message_ids=message_id
222223
)
223224

224-
raise ValueError("No argument supplied. Either pass link OR (chat_id, message_ids or reply_to_message_ids)")
225+
raise ValueError("No valid argument supplied. https://docs.pyrogram.org/api/methods/get_messages")

0 commit comments

Comments
 (0)