Skip to content

Commit e6fb7b9

Browse files
authored
Improve documentation of various types
1 parent a991b45 commit e6fb7b9

File tree

9 files changed

+25
-25
lines changed

9 files changed

+25
-25
lines changed

pyrogram/methods/chats/set_slow_mode.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ async def set_slow_mode(
3737
Unique identifier (int) or username (str) of the target chat.
3838
3939
seconds (``int`` | ``None``):
40-
Seconds in which members will be able to send only one message per this interval.
41-
Valid values are: 0 or None (off), 10, 30, 60 (1m), 300 (5m), 900 (15m) or 3600 (1h).
40+
New slow mode delay for the chat, in seconds; must be one of: 0 or None (off), 5, 10, 30, 60 (1 minute), 300 (5 minutes), 900 (15 minutes), 3600 (1 hour).
4241
4342
Returns:
4443
``bool``: True on success.

pyrogram/methods/messages/send_contact.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ async def send_contact(
6363
For a contact that exists in your Telegram address book you can use his phone number (str).
6464
6565
phone_number (``str``):
66-
Contact's phone number.
66+
Phone number of the user.
6767
6868
first_name (``str``):
69-
Contact's first name.
69+
First name of the user; 1-64 characters.
7070
7171
last_name (``str``, *optional*):
72-
Contact's last name.
72+
Last name of the user; 0-64 characters.
7373
7474
vcard (``str``, *optional*):
75-
Additional data about the contact in the form of a vCard, 0-2048 bytes
75+
Additional data about the user in a form of `vCard <https://en.wikipedia.org/wiki/VCard>`_; 0-2048 bytes in length.
7676
7777
disable_notification (``bool``, *optional*):
7878
Sends the message silently.

pyrogram/types/inline_mode/inline_query_result_contact.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ class InlineQueryResultContact(InlineQueryResult):
3434
3535
Parameters:
3636
phone_number (``str``):
37-
Contact's phone number.
37+
Phone number of the user.
3838
3939
first_name (``str``):
40-
Contact's first name.
40+
First name of the user; 1-64 characters.
4141
4242
last_name (``str``, *optional*):
43-
Contact's last name.
43+
Last name of the user; 0-64 characters.
4444
4545
vcard (``str``, *optional*):
46-
Additional data about the contact in the form of a `vCard <https://en.wikipedia.org/wiki/VCard>`_, 0-2048 bytes.
46+
Additional data about the user in a form of `vCard <https://en.wikipedia.org/wiki/VCard>`_; 0-2048 bytes in length.
4747
4848
id (``str``, *optional*):
4949
Unique identifier for this result, 1-64 bytes.

pyrogram/types/input_message_content/external_reply_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ExternalReplyInfo(Object):
2828
"""This object contains information about a message that is being replied to, which may come from another chat or forum topic.
2929
3030
Parameters:
31-
origin (:obj:`~pyrogram.types.User`, *optional*):
31+
origin (:obj:`~pyrogram.types.MessageOrigin`, *optional*):
3232
Origin of the message replied to by the given message
3333
3434
chat (:obj:`~pyrogram.types.Chat`, *optional*):

pyrogram/types/input_message_content/input_contact_message_content.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ class InputContactMessageContent(InputMessageContent):
3131
3232
Parameters:
3333
phone_number (``str``):
34-
Contact's phone number.
34+
Phone number of the user.
3535
3636
first_name (``str``):
37-
Contact's first name.
37+
First name of the user; 1-64 characters.
3838
3939
last_name (``str``, *optional*):
40-
Contact's last name.
40+
Last name of the user; 0-64 characters.
4141
4242
vcard (``str``, *optional*):
43-
Additional data about the contact in the form of a `vCard <https://en.wikipedia.org/wiki/VCard>`_, 0-2048 bytes.
43+
Additional data about the user in a form of `vCard <https://en.wikipedia.org/wiki/VCard>`_; 0-2048 bytes in length.
4444
4545
"""
4646

pyrogram/types/messages_and_media/contact.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,20 @@ class Contact(Object):
2626
2727
Parameters:
2828
phone_number (``str``):
29-
Contact's phone number.
29+
Phone number of the user.
3030
3131
first_name (``str``):
32-
Contact's first name.
32+
First name of the user; 1-64 characters.
3333
3434
last_name (``str``, *optional*):
35-
Contact's last name.
35+
Last name of the user; 0-64 characters.
3636
3737
user_id (``int``, *optional*):
3838
Contact's user identifier in Telegram.
3939
4040
vcard (``str``, *optional*):
41-
Additional data about the contact in the form of a vCard.
41+
Additional data about the user in a form of `vCard <https://en.wikipedia.org/wiki/VCard>`_; 0-2048 bytes in length.
42+
4243
"""
4344

4445
def __init__(

pyrogram/types/messages_and_media/message.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,21 +2358,21 @@ async def reply_contact(
23582358
23592359
Parameters:
23602360
phone_number (``str``):
2361-
Contact's phone number.
2361+
Phone number of the user.
23622362
23632363
first_name (``str``):
2364-
Contact's first name.
2364+
First name of the user; 1-64 characters.
23652365
23662366
quote (``bool``, *optional*):
23672367
If ``True``, the message will be sent as a reply to this message.
23682368
If *reply_to_message_id* is passed, this parameter will be ignored.
23692369
Defaults to ``True`` in group chats and ``False`` in private chats.
23702370
23712371
last_name (``str``, *optional*):
2372-
Contact's last name.
2372+
Last name of the user; 0-64 characters.
23732373
23742374
vcard (``str``, *optional*):
2375-
Additional data about the contact in the form of a vCard, 0-2048 bytes
2375+
Additional data about the user in a form of `vCard <https://en.wikipedia.org/wiki/VCard>`_; 0-2048 bytes in length.
23762376
23772377
disable_notification (``bool``, *optional*):
23782378
Sends the message silently.

pyrogram/types/stories/story.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Story(Object, Update):
8383
Clickable areas to be shown on the story content.
8484
8585
has_protected_content (``bool``, *optional*):
86-
True, if the story can't be forwarded.
86+
True, if the story can't be forwarded as a message or reposted as a story.
8787
8888
reactions (List of :obj:`~pyrogram.types.Reaction`):
8989
List of the reactions to this story.

pyrogram/types/user_and_chats/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class Chat(Object):
111111
Returned only in :meth:`~pyrogram.Client.get_chat`.
112112
113113
join_by_request (``bool``, *optional*):
114-
True, if all users directly joining the supergroup need to be approved by supergroup administrators.
114+
True, if all users directly joining the supergroup need to be approved by supergroup administrators. Can be True only for non-broadcast supergroups with username, location, or a linked chat.
115115
116116
description (``str``, *optional*):
117117
Description, for groups, supergroups and channel chats.

0 commit comments

Comments
 (0)