File tree Expand file tree Collapse file tree 10 files changed +31
-18
lines changed Expand file tree Collapse file tree 10 files changed +31
-18
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ async def answer_pre_checkout_query(
3131
3232 Use this method to respond to such pre-checkout queries.
3333
34- **Note**: The API must receive an answer within 10 seconds after the pre-checkout query was sent.
34+ .. note::
35+
36+ The API must receive an answer within 10 seconds after the pre-checkout query was sent.
3537
3638 .. include:: /_includes/usable-by/bots.rst
3739
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ async def send_gift(
3535 ) -> bool :
3636 """Sends a gift to another user.
3737
38- .. include:: /_includes/usable-by/users.rst
38+ .. include:: /_includes/usable-by/users-bots .rst
3939
4040 Parameters:
4141 user_id (``int`` | ``str``):
Original file line number Diff line number Diff line change @@ -29,9 +29,11 @@ async def set_chat_message_auto_delete_time(
2929 message_auto_delete_time : int
3030 ) -> "types.Message" :
3131 """Changes the message auto-delete or self-destruct (for secret chats) time in a chat.
32-
32+
3333 Requires change_info administrator right in basic groups, supergroups and channels.
3434
35+ .. include:: /_includes/usable-by/users.rst
36+
3537 Parameters:
3638 chat_id (``int`` | ``str``):
3739 Unique identifier (int) or username (str) of the target chat.
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ async def set_chat_protected_content(
3030 ) -> bool :
3131 """Set the chat protected content setting.
3232
33- .. include:: /_includes/usable-by/users-bots .rst
33+ .. include:: /_includes/usable-by/users.rst
3434
3535 Parameters:
3636 chat_id (``int`` | ``str``):
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ async def set_slow_mode(
3030 ) -> bool :
3131 """Set the slow mode interval for a chat.
3232
33- .. include:: /_includes/usable-by/users-bots .rst
33+ .. include:: /_includes/usable-by/users.rst
3434
3535 Parameters:
3636 chat_id (``int`` | ``str``):
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ async def get_default_emoji_statuses(
2929 ) -> List ["types.EmojiStatus" ]:
3030 """Get the default emoji statuses.
3131
32- .. include:: /_includes/usable-by/users-bots .rst
32+ .. include:: /_includes/usable-by/users.rst
3333
3434 Returns:
3535 List of :obj:`~pyrogram.types.EmojiStatus`: On success, a list of emoji statuses is returned.
Original file line number Diff line number Diff line change @@ -27,17 +27,18 @@ async def set_username(
2727 self : "pyrogram.Client" ,
2828 username : Optional [str ]
2929 ) -> bool :
30- """Set your own username.
30+ """Changes the editable username of the current user .
3131
32- This method only works for users, not bots. Bot usernames must be changed via Bot Support or by recreating
33- them from scratch using BotFather. To set a channel or supergroup username you can use
34- :meth:`~pyrogram.Client.set_chat_username`.
32+ This method only works for users, not bots.
33+ Bot usernames must be changed via Bot Support or by recreating them from scratch using BotFather.
34+ To set a channel or supergroup username you can use :meth:`~pyrogram.Client.set_chat_username`.
3535
3636 .. include:: /_includes/usable-by/users.rst
3737
3838 Parameters:
3939 username (``str`` | ``None``):
4040 Username to set. "" (empty string) or None to remove it.
41+ The username can't be completely removed if there is another active or disabled username.
4142
4243 Returns:
4344 ``bool``: True on success.
Original file line number Diff line number Diff line change 2323class UpdateProfile :
2424 async def update_profile (
2525 self : "pyrogram.Client" ,
26+ * ,
2627 first_name : str = None ,
2728 last_name : str = None ,
2829 bio : str = None
@@ -35,14 +36,15 @@ async def update_profile(
3536
3637 Parameters:
3738 first_name (``str``, *optional*):
38- The new first name.
39+ The new first name; 1-64 characters .
3940
4041 last_name (``str``, *optional*):
41- The new last name.
42+ The new last name; 1-64 characters .
4243 Pass "" (empty string) to remove it.
4344
4445 bio (``str``, *optional*):
45- The new bio, also known as "about". Max 70 characters.
46+ Changes the bio of the current user.
47+ Max ``intro_description_length_limit`` characters without line feeds.
4648 Pass "" (empty string) to remove it.
4749
4850 Returns:
Original file line number Diff line number Diff line change @@ -73,12 +73,17 @@ class InlineKeyboardButton(Object):
7373
7474 callback_game (:obj:`~pyrogram.types.CallbackGame`, *optional*):
7575 Description of the game that will be launched when the user presses the button.
76- **NOTE**: This type of button **must** always be the first button in the first row.
76+
77+ .. note::
78+
79+ This type of button **must** always be the first button in the first row.
7780
7881 pay (``bool``, *optional*):
7982 Specify True, to send a Pay button. Substrings "⭐" and "XTR" in the buttons's text will be replaced with a Telegram Star icon.
8083
81- **NOTE**: This type of button **must** always be the first button in the first row and can only be used in invoice messages.
84+ .. note::
85+
86+ This type of button **must** always be the first button in the first row and can only be used in invoice messages.
8287
8388 callback_data_with_password (``bytes``, *optional*):
8489 A button that asks for the 2-step verification password of the current user and then sends a callback query to a bot Data to be sent to the bot via a callback query.
Original file line number Diff line number Diff line change @@ -34,9 +34,10 @@ class LoginUrl(Object):
3434 be opened. The data added is the same as described in
3535 `Receiving authorization data <https://core.telegram.org/widgets/login#receiving-authorization-data>`.
3636
37- **NOTE**: You **must** always check the hash of the received data to verify the authentication and the
38- integrity of the data as described in
39- `Checking authorization <https://core.telegram.org/widgets/login#checking-authorization>`_.
37+ .. note::
38+
39+ You **must** always check the hash of the received data to verify the authentication
40+ and the integrity of the data as described in `Checking authorization <https://core.telegram.org/widgets/login#checking-authorization>`_.
4041
4142 forward_text (``str``, *optional*):
4243 New text of the button in forwarded messages.
You can’t perform that action at this time.
0 commit comments