Fix captions being None when editing media message (#617)
* added missing doc string * Fix for "None" for default caption
This commit is contained in:
parent
3be981ada1
commit
56e79c10f8
@ -37,7 +37,7 @@ class InputMedia(Object):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
caption: str = None,
|
caption: str = "",
|
||||||
parse_mode: str = None,
|
parse_mode: str = None,
|
||||||
caption_entities: List[MessageEntity] = None
|
caption_entities: List[MessageEntity] = None
|
||||||
):
|
):
|
||||||
|
@ -29,7 +29,8 @@ class InputMediaAnimation(InputMedia):
|
|||||||
media (``str``):
|
media (``str``):
|
||||||
Animation to send.
|
Animation to send.
|
||||||
Pass a file_id as string to send a file that exists on the Telegram servers or
|
Pass a file_id as string to send a file that exists on the Telegram servers or
|
||||||
pass a file path as string to upload a new file that exists on your local machine.
|
pass a file path as string to upload a new file that exists on your local machine or
|
||||||
|
pass an HTTP URL as a string for Telegram to get an animation from the Internet.
|
||||||
|
|
||||||
thumb (``str``, *optional*):
|
thumb (``str``, *optional*):
|
||||||
Thumbnail of the animation file sent.
|
Thumbnail of the animation file sent.
|
||||||
@ -65,7 +66,7 @@ class InputMediaAnimation(InputMedia):
|
|||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
thumb: str = None,
|
thumb: str = None,
|
||||||
caption: str = None,
|
caption: str = "",
|
||||||
parse_mode: Optional[str] = object,
|
parse_mode: Optional[str] = object,
|
||||||
caption_entities: List[MessageEntity] = None,
|
caption_entities: List[MessageEntity] = None,
|
||||||
width: int = 0,
|
width: int = 0,
|
||||||
|
@ -31,7 +31,8 @@ class InputMediaAudio(InputMedia):
|
|||||||
media (``str``):
|
media (``str``):
|
||||||
Audio to send.
|
Audio to send.
|
||||||
Pass a file_id as string to send an audio that exists on the Telegram servers or
|
Pass a file_id as string to send an audio that exists on the Telegram servers or
|
||||||
pass a file path as string to upload a new audio that exists on your local machine.
|
pass a file path as string to upload a new audio that exists on your local machine or
|
||||||
|
pass an HTTP URL as a string for Telegram to get an audio file from the Internet.
|
||||||
|
|
||||||
thumb (``str``, *optional*):
|
thumb (``str``, *optional*):
|
||||||
Thumbnail of the music file album cover.
|
Thumbnail of the music file album cover.
|
||||||
@ -67,7 +68,7 @@ class InputMediaAudio(InputMedia):
|
|||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
thumb: str = None,
|
thumb: str = None,
|
||||||
caption: str = None,
|
caption: str = "",
|
||||||
parse_mode: Optional[str] = object,
|
parse_mode: Optional[str] = object,
|
||||||
caption_entities: List[MessageEntity] = None,
|
caption_entities: List[MessageEntity] = None,
|
||||||
duration: int = 0,
|
duration: int = 0,
|
||||||
|
@ -29,7 +29,8 @@ class InputMediaDocument(InputMedia):
|
|||||||
media (``str``):
|
media (``str``):
|
||||||
File to send.
|
File to send.
|
||||||
Pass a file_id as string to send a file that exists on the Telegram servers or
|
Pass a file_id as string to send a file that exists on the Telegram servers or
|
||||||
pass a file path as string to upload a new file that exists on your local machine.
|
pass a file path as string to upload a new file that exists on your local machine or
|
||||||
|
pass an HTTP URL as a string for Telegram to get a file from the Internet.
|
||||||
|
|
||||||
thumb (``str``):
|
thumb (``str``):
|
||||||
Thumbnail of the file sent.
|
Thumbnail of the file sent.
|
||||||
@ -56,7 +57,7 @@ class InputMediaDocument(InputMedia):
|
|||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
thumb: str = None,
|
thumb: str = None,
|
||||||
caption: str = None,
|
caption: str = "",
|
||||||
parse_mode: Optional[str] = object,
|
parse_mode: Optional[str] = object,
|
||||||
caption_entities: List[MessageEntity] = None
|
caption_entities: List[MessageEntity] = None
|
||||||
):
|
):
|
||||||
|
@ -30,8 +30,8 @@ class InputMediaPhoto(InputMedia):
|
|||||||
media (``str``):
|
media (``str``):
|
||||||
Photo to send.
|
Photo to send.
|
||||||
Pass a file_id as string to send a photo that exists on the Telegram servers or
|
Pass a file_id as string to send a photo that exists on the Telegram servers or
|
||||||
pass a file path as string to upload a new photo that exists on your local machine.
|
pass a file path as string to upload a new photo that exists on your local machine or
|
||||||
Sending photo by a URL is currently unsupported.
|
pass an HTTP URL as a string for Telegram to get a photo from the Internet.
|
||||||
|
|
||||||
caption (``str``, *optional*):
|
caption (``str``, *optional*):
|
||||||
Caption of the photo to be sent, 0-1024 characters.
|
Caption of the photo to be sent, 0-1024 characters.
|
||||||
@ -51,7 +51,7 @@ class InputMediaPhoto(InputMedia):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
caption: str = None,
|
caption: str = "",
|
||||||
parse_mode: Optional[str] = object,
|
parse_mode: Optional[str] = object,
|
||||||
caption_entities: List[MessageEntity] = None
|
caption_entities: List[MessageEntity] = None
|
||||||
):
|
):
|
||||||
|
@ -30,8 +30,8 @@ class InputMediaVideo(InputMedia):
|
|||||||
media (``str``):
|
media (``str``):
|
||||||
Video to send.
|
Video to send.
|
||||||
Pass a file_id as string to send a video that exists on the Telegram servers or
|
Pass a file_id as string to send a video that exists on the Telegram servers or
|
||||||
pass a file path as string to upload a new video that exists on your local machine.
|
pass a file path as string to upload a new video that exists on your local machine or
|
||||||
Sending video by a URL is currently unsupported.
|
pass an HTTP URL as a string for Telegram to get a video from the Internet.
|
||||||
|
|
||||||
thumb (``str``):
|
thumb (``str``):
|
||||||
Thumbnail of the video sent.
|
Thumbnail of the video sent.
|
||||||
@ -70,7 +70,7 @@ class InputMediaVideo(InputMedia):
|
|||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
thumb: str = None,
|
thumb: str = None,
|
||||||
caption: str = None,
|
caption: str = "",
|
||||||
parse_mode: Optional[str] = object,
|
parse_mode: Optional[str] = object,
|
||||||
caption_entities: List[MessageEntity] = None,
|
caption_entities: List[MessageEntity] = None,
|
||||||
width: int = 0,
|
width: int = 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user