Skip to content

Commit 677f659

Browse files
fix: some docstrings
1 parent 0a8a3fb commit 677f659

8 files changed

Lines changed: 15 additions & 15 deletions

File tree

pyrogram/methods/messages/copy_media_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ async def copy_media_group(
7373
If not specified, the original caption is kept.
7474
Pass "" (empty string) to remove the caption.
7575
76-
If a ``string`` is passed, it becomes a caption only for the first media.
77-
If a list of ``string`` passed, each element becomes caption for each media element.
76+
If a ``str`` is passed, it becomes a caption only for the first media.
77+
If a list of ``str`` passed, each element becomes caption for each media element.
7878
You can pass ``None`` in list to keep the original caption (see examples below).
7979
8080
disable_notification (``bool``, *optional*):

pyrogram/methods/messages/copy_message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ async def copy_message(
7474
message_id (``int``):
7575
Message identifier in the chat specified in *from_chat_id*.
7676
77-
caption (``string``, *optional*):
77+
caption (``str``, *optional*):
7878
New caption for media, 0-1024 characters after entities parsing.
7979
If not specified, the original caption is kept.
8080
Pass "" (empty string) to remove the caption.

pyrogram/methods/messages/send_poll.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ async def send_poll(
3131
chat_id: Union[int, str],
3232
question: Union[str, "types.FormattedText"],
3333
options: List[Union[str, "types.InputPollOption"]],
34+
description: Optional[Union[str, "types.FormattedText"]] = None,
3435
description_media: Optional["types.InputMedia"] = None,
3536
message_thread_id: Optional[int] = None,
3637
business_connection_id: Optional[str] = None,
@@ -47,7 +48,6 @@ async def send_poll(
4748
open_period: Optional[int] = None,
4849
close_date: Optional[datetime] = None,
4950
is_closed: Optional[bool] = None,
50-
description: Optional[Union[str, "types.FormattedText"]] = None,
5151
disable_notification: Optional[bool] = None,
5252
protect_content: Optional[bool] = None,
5353
allow_paid_broadcast: Optional[bool] = None,
@@ -87,7 +87,10 @@ async def send_poll(
8787
options (List of :obj:`~pyrogram.types.InputPollOption`):
8888
List of 2-12 answer options.
8989
90-
explanation_media (:obj:`~pyrogram.types.InputMedia` | :obj:`~pyrogram.types.Location`, *optional*):
90+
description (``str`` | :obj:`~pyrogram.types.FormattedText`, *optional*):
91+
Description of the poll to be sent, 0-1024 characters after entities parsing.
92+
93+
description_media (:obj:`~pyrogram.types.InputMedia` | :obj:`~pyrogram.types.Location`, *optional*):
9194
Media attached to the poll.
9295
9396
message_thread_id (``int``, *optional*):
@@ -145,9 +148,6 @@ async def send_poll(
145148
This can be useful for poll preview.
146149
For bots only.
147150
148-
description (``str`` | :obj:`~pyrogram.types.FormattedText`, *optional*):
149-
Description of the poll to be sent, 0-1024 characters after entities parsing.
150-
151151
disable_notification (``bool``, *optional*):
152152
Sends the message silently.
153153
Users will receive a notification with no sound.

pyrogram/methods/stories/copy_story.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async def copy_story(
5757
story_id (``int``):
5858
Message identifier in the chat specified in *from_chat_id*.
5959
60-
caption (``string``, *optional*):
60+
caption (``str``, *optional*):
6161
New caption for story, 0-1024 characters after entities parsing.
6262
If not specified, the original caption is kept.
6363
Pass "" (empty string) to remove the caption.

pyrogram/types/messages_and_media/auction_bid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class AuctionBid(Object):
3030
star_count (``int``):
3131
The number of Telegram Stars that were put in the bid.
3232
33-
bid_date (``datetime``):
33+
bid_date (:py:obj:`~datetime.datetime`):
3434
Date when the bid was made.
3535
3636
position (``int``):

pyrogram/types/messages_and_media/dice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Dice(Object):
2525
"""A dice with a random value from 1 to 6 for currently supported base emoji.
2626
2727
Parameters:
28-
emoji (``string``):
28+
emoji (``str``):
2929
Emoji on which the dice throw animation is based.
3030
3131
value (``int``):

pyrogram/types/messages_and_media/message.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8615,7 +8615,7 @@ async def copy(
86158615
For your personal cloud (Saved Messages) you can simply use "me" or "self".
86168616
For a contact that exists in your Telegram address book you can use his phone number (str).
86178617
8618-
caption (``string``, *optional*):
8618+
caption (``str``, *optional*):
86198619
New caption for media, 0-1024 characters after entities parsing.
86208620
If not specified, the original caption is kept.
86218621
Pass "" (empty string) to remove the caption.
@@ -8864,8 +8864,8 @@ async def copy_media_group(
88648864
If not specified, the original caption is kept.
88658865
Pass "" (empty string) to remove the caption.
88668866
8867-
If a ``string`` is passed, it becomes a caption only for the first media.
8868-
If a list of ``string`` passed, each element becomes caption for each media element.
8867+
If a ``str`` is passed, it becomes a caption only for the first media.
8868+
If a list of ``str`` passed, each element becomes caption for each media element.
88698869
You can pass ``None`` in list to keep the original caption.
88708870
88718871
disable_notification (``bool``, *optional*):

pyrogram/types/messages_and_media/story.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ async def copy(
17291729
Unique identifier (int) or username (str) of the target chat.
17301730
For your personal stories you can simply use "me" or "self".
17311731
1732-
caption (``string``, *optional*):
1732+
caption (``str``, *optional*):
17331733
New caption for story, 0-1024 characters after entities parsing.
17341734
If not specified, the original caption is kept.
17351735
Pass "" (empty string) to remove the caption.

0 commit comments

Comments
 (0)