Skip to content

Commit

Permalink
fix some docstrings
Browse files Browse the repository at this point in the history
Signed-off-by: eyMarv <[email protected]>
  • Loading branch information
eyMarv committed Feb 28, 2024
1 parent d8d2a06 commit 1247731
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
3 changes: 2 additions & 1 deletion pyrogram/methods/bots/set_bot_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ async def set_bot_info(
For userbot you can only use this method if you are the owner of target bot.
Parameters:
lang_code ``str``:
lang_code (``str``):
A two-letter ISO 639-1 language code.
bot (``int`` | ``str``, *optional*) :
Unique identifier (int) or username (str) of the target bot.
Expand Down
3 changes: 3 additions & 0 deletions pyrogram/methods/pyromod/ask.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ async def ask(
Whether to alert the user if they click a button that doesn’t match the filters.
Default to True.
message_id (``int`` | ``str`` ):
The message ID to listen for.
inline_message_id (``str``, *optional*):
The inline message ID to listen for.
Expand Down
6 changes: 3 additions & 3 deletions pyrogram/methods/pyromod/register_next_step_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def register_next_step_handler(
callback (``Callable``):
The callback to call when the listener is fulfilled.
chat_id (``int`` | ``str`` | Iterable of ``int`` | Iterable of ``str``, *optional*):
The chat ID to listen for.
user_id (``int`` | ``str`` | Iterable of ``int`` | Iterable of ``str``, *optional*):
The user ID to listen for.
Expand All @@ -55,9 +58,6 @@ def register_next_step_handler(
The type of listener to listen for.
Default to Message.
timeout (``int``, *optional*):
The maximum amount of time to wait for a message.
unallowed_click_alert (``bool``, *optional*):
Whether to alert the user if they click a button that doesn’t match the filters.
Default to True.
Expand Down
23 changes: 21 additions & 2 deletions pyrogram/types/messages_and_media/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ async def wait_for_click(
"""Waits for a callback query to be clicked on the message.
Parameters:
user_id (``int`` | ``str`` | Iterable of ``int`` | Iterable of ``str``, *optional*):
from_user_id (``int`` | ``str`` | Iterable of ``int`` | Iterable of ``str``, *optional*):
The user ID to listen for.
timeout (``int``, *optional*):
Expand Down Expand Up @@ -813,7 +813,7 @@ async def _parse(
service_type = enums.MessageServiceType.WEB_APP_DATA
elif isinstance(action, raw.types.MessageActionGiveawayLaunch):
giveaway_launched = True
service_type = enums.MessageServiceType.GIVEAWAY_LAUNCH
service_type = enums.MessageServiceType.GIVEAWAY_LAUNCHED
elif isinstance(action, raw.types.MessageActionGiftCode):
gift_code = types.GiftCode._parse(client, action, chats)
service_type = enums.MessageServiceType.GIFT_CODE
Expand Down Expand Up @@ -2414,6 +2414,11 @@ async def reply_inline_bot_result(
Text to quote.
for reply_to_message only.
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
By default, quote_text are parsed using both Markdown and HTML styles.
You can combine both syntaxes together.
For quote_text.
quote_entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
Expand Down Expand Up @@ -2442,6 +2447,8 @@ async def reply_inline_bot_result(
message_thread_id=message_thread_id,
reply_to_message_id=reply_to_message_id,
quote_text=quote_text,
quote_entities=quote_entities,
parse_mode=parse_mode,
)

async def reply_location(
Expand Down Expand Up @@ -2615,6 +2622,11 @@ async def reply_media_group(
Text to quote.
for reply_to_message only.
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
By default, quote_text are parsed using both Markdown and HTML styles.
You can combine both syntaxes together.
For quote_text.
quote_entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
Expand Down Expand Up @@ -2650,6 +2662,8 @@ async def reply_media_group(
reply_to_message_id=reply_to_message_id,
reply_to_chat_id=reply_to_chat_id,
quote_text=quote_text,
quote_entities=quote_entities,
parse_mode=parse_mode,
)

async def reply_photo(
Expand Down Expand Up @@ -3530,6 +3544,11 @@ async def reply_video_note(
Text to quote.
for reply_to_message only.
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
By default, quote_text are parsed using both Markdown and HTML styles.
You can combine both syntaxes together.
For quote_text.
quote_entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*):
List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
for reply_to_message only.
Expand Down
3 changes: 0 additions & 3 deletions pyrogram/types/messages_and_media/story.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,9 +1510,6 @@ async def edit(
await story.edit_caption("hello")
Parameters:
story_id (``int``):
Unique identifier (int) of the target story.
animation (``str`` | ``BinaryIO``, *optional*):
New story Animation.
Pass a file_id as string to send a animation that exists on the Telegram servers,
Expand Down

0 comments on commit 1247731

Please sign in to comment.