Usethismethodwhenyouneedtotelltheuserthatsomethingishappeningonthebot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
Note:ThisfunctionmaynotpreservetheoriginalfilenameandMIMEtype.Youshouldsavethefile's MIME type and name (if available) when the File object is received.
@ -1016,11 +1015,11 @@ class Bot(ContextInstanceMixin, BaseBot):
Note:Eachadministratorinachatgeneratestheirowninvitelinks.Botscan't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink – after this the link will become available to the bot via the getChat method. If your bot needs to generate a new invite link replacing its previous one, use exportChatInviteLink again.
@ -1168,10 +1167,10 @@ class Bot(ContextInstanceMixin, BaseBot):
Usethismethodtosetanewprofilephotoforthechat.Photoscan't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
@ -1184,10 +1183,10 @@ class Bot(ContextInstanceMixin, BaseBot):
Usethismethodtodeleteachatphoto.Photoscan't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
@ -1198,10 +1197,10 @@ class Bot(ContextInstanceMixin, BaseBot):
Usethismethodtochangethetitleofachat.Titlescan't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.
@ -1214,11 +1213,11 @@ class Bot(ContextInstanceMixin, BaseBot):
@ -19,7 +19,7 @@ class InputMediaAnimation(InputMedia):
type:str=Field("animation",const=True)
"""Type of the result, must be animation"""
media:str
media:Union[str,InputFile]
"""File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name."""
thumb:Optional[Union[InputFile,str]]=None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>."""
@ -19,7 +19,7 @@ class InputMediaAudio(InputMedia):
type:str=Field("audio",const=True)
"""Type of the result, must be audio"""
media:str
media:Union[str,InputFile]
"""File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name."""
thumb:Optional[Union[InputFile,str]]=None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>."""
@ -19,7 +19,7 @@ class InputMediaDocument(InputMedia):
type:str=Field("document",const=True)
"""Type of the result, must be document"""
media:str
media:Union[str,InputFile]
"""File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name."""
thumb:Optional[Union[InputFile,str]]=None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>."""
@ -16,7 +19,7 @@ class InputMediaPhoto(InputMedia):
type:str=Field("photo",const=True)
"""Type of the result, must be photo"""
media:str
media:Union[str,InputFile]
"""File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name."""
caption:Optional[str]=None
"""Caption of the photo to be sent, 0-1024 characters"""
@ -19,7 +19,7 @@ class InputMediaVideo(InputMedia):
type:str=Field("video",const=True)
"""Type of the result, must be video"""
media:str
media:Union[str,InputFile]
"""File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name."""
thumb:Optional[Union[InputFile,str]]=None
"""Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>."""