2626 User , Video , Voice , Venue , MessageEntity , Game )
2727from telegram .utils .deprecate import warn_deprecate_obj
2828from telegram .utils .helpers import escape_html , escape_markdown
29+ from telegram .videonote import VideoNote
2930
3031
3132class Message (TelegramObject ):
@@ -52,6 +53,8 @@ class Message(TelegramObject):
5253 sticker (:class:`telegram.Sticker`):
5354 video (:class:`telegram.Video`):
5455 voice (:class:`telegram.Voice`):
56+ video_note (:class:`telegram.VideoNote`): Message is a video note, information about the
57+ video message
5558 caption (str):
5659 contact (:class:`telegram.Contact`):
5760 location (:class:`telegram.Location`):
@@ -92,6 +95,7 @@ class Message(TelegramObject):
9295 sticker (Optional[:class:`telegram.Sticker`]):
9396 video (Optional[:class:`telegram.Video`]):
9497 voice (Optional[:class:`telegram.Voice`]):
98+ video_note (Optional[:class:`telegram.VideoNote`]):
9599 caption (Optional[str]):
96100 contact (Optional[:class:`telegram.Contact`]):
97101 location (Optional[:class:`telegram.Location`]):
@@ -144,6 +148,7 @@ def __init__(self,
144148 pinned_message = None ,
145149 forward_from_message_id = None ,
146150 bot = None ,
151+ video_note = None ,
147152 ** kwargs ):
148153 # Required
149154 self .message_id = int (message_id )
@@ -165,6 +170,7 @@ def __init__(self,
165170 self .sticker = sticker
166171 self .video = video
167172 self .voice = voice
173+ self .video_note = video_note
168174 self .caption = caption
169175 self .contact = contact
170176 self .location = location
@@ -223,6 +229,7 @@ def de_json(data, bot):
223229 data ['sticker' ] = Sticker .de_json (data .get ('sticker' ), bot )
224230 data ['video' ] = Video .de_json (data .get ('video' ), bot )
225231 data ['voice' ] = Voice .de_json (data .get ('voice' ), bot )
232+ data ['video_note' ] = VideoNote .de_json (data .get ('video_note' ), bot )
226233 data ['contact' ] = Contact .de_json (data .get ('contact' ), bot )
227234 data ['location' ] = Location .de_json (data .get ('location' ), bot )
228235 data ['venue' ] = Venue .de_json (data .get ('venue' ), bot )
@@ -415,6 +422,23 @@ def reply_video(self, *args, **kwargs):
415422 self ._quote (kwargs )
416423 return self .bot .sendVideo (self .chat_id , * args , ** kwargs )
417424
425+ def reply_video_note (self , * args , ** kwargs ):
426+ """
427+ Shortcut for ``bot.send_video_note(update.message.chat_id, *args, **kwargs)``
428+
429+ Keyword Args:
430+ quote (Optional[bool]): If set to ``True``, the video is sent as an actual reply to
431+ this message. If ``reply_to_message_id`` is passed in ``kwargs``, this parameter
432+ will be ignored. Default: ``True`` in group chats and ``False`` in private chats.
433+
434+ Returns:
435+ :class:`telegram.Message`: On success, instance representing the message posted.
436+
437+ """
438+
439+ self ._quote (kwargs )
440+ return self .bot .send_video_note (self .chat_id , * args , ** kwargs )
441+
418442 def reply_voice (self , * args , ** kwargs ):
419443 """
420444 Shortcut for ``bot.sendVoice(update.message.chat_id, *args, **kwargs)``
0 commit comments