@@ -35,6 +35,7 @@ def send_audio(self,
3535 duration : int = 0 ,
3636 performer : str = None ,
3737 title : str = None ,
38+ thumb : str = None ,
3839 disable_notification : bool = None ,
3940 reply_to_message_id : int = None ,
4041 reply_markup = None ,
@@ -73,6 +74,12 @@ def send_audio(self,
7374 title (``str``, *optional*):
7475 Track name.
7576
77+ thumb (``str``, *optional*):
78+ Thumbnail of the music file album cover.
79+ The thumbnail should be in JPEG format and less than 200 KB in size.
80+ A thumbnail's width and height should not exceed 90 pixels.
81+ Thumbnails can't be reused and can be only uploaded as a new file.
82+
7683 disable_notification (``bool``, *optional*):
7784 Sends the message silently.
7885 Users will receive a notification with no sound.
@@ -117,10 +124,12 @@ def send_audio(self,
117124 style = self .html if parse_mode .lower () == "html" else self .markdown
118125
119126 if os .path .exists (audio ):
127+ thumb = None if thumb is None else self .save_file (thumb )
120128 file = self .save_file (audio , progress = progress , progress_args = progress_args )
121129 media = types .InputMediaUploadedDocument (
122130 mime_type = mimetypes .types_map .get ("." + audio .split ("." )[- 1 ], "audio/mpeg" ),
123131 file = file ,
132+ thumb = thumb ,
124133 attributes = [
125134 types .DocumentAttributeAudio (
126135 duration = duration ,
0 commit comments