X Tutup
Skip to content

Commit ae39c90

Browse files
committed
Add video_note to Message
1 parent 65929a0 commit ae39c90

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

telegram/message.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from telegram import (Audio, Contact, Document, Chat, Location, PhotoSize, Sticker, TelegramObject,
2626
User, Video, Voice, Venue, MessageEntity, Game)
2727
from telegram.utils.helpers import escape_html, escape_markdown
28+
from telegram.videonote import VideoNote
2829

2930

3031
class Message(TelegramObject):
@@ -51,6 +52,8 @@ class Message(TelegramObject):
5152
sticker (:class:`telegram.Sticker`):
5253
video (:class:`telegram.Video`):
5354
voice (:class:`telegram.Voice`):
55+
video_note (:class:`telegram.VideoNote`): Message is a video note, information about the
56+
video message
5457
caption (str):
5558
contact (:class:`telegram.Contact`):
5659
location (:class:`telegram.Location`):
@@ -91,6 +94,7 @@ class Message(TelegramObject):
9194
sticker (Optional[:class:`telegram.Sticker`]):
9295
video (Optional[:class:`telegram.Video`]):
9396
voice (Optional[:class:`telegram.Voice`]):
97+
video_note (Optional[:class:`telegram.VideoNote`]):
9498
caption (Optional[str]):
9599
contact (Optional[:class:`telegram.Contact`]):
96100
location (Optional[:class:`telegram.Location`]):
@@ -125,6 +129,7 @@ def __init__(self,
125129
sticker=None,
126130
video=None,
127131
voice=None,
132+
video_note=None,
128133
caption=None,
129134
contact=None,
130135
location=None,
@@ -163,6 +168,7 @@ def __init__(self,
163168
self.sticker = sticker
164169
self.video = video
165170
self.voice = voice
171+
self.video_note = video_note
166172
self.caption = caption
167173
self.contact = contact
168174
self.location = location
@@ -220,6 +226,7 @@ def de_json(data, bot):
220226
data['sticker'] = Sticker.de_json(data.get('sticker'), bot)
221227
data['video'] = Video.de_json(data.get('video'), bot)
222228
data['voice'] = Voice.de_json(data.get('voice'), bot)
229+
data['video_note'] = VideoNote.de_json(data.get('video_note'), bot)
223230
data['contact'] = Contact.de_json(data.get('contact'), bot)
224231
data['location'] = Location.de_json(data.get('location'), bot)
225232
data['venue'] = Venue.de_json(data.get('venue'), bot)

0 commit comments

Comments
 (0)
X Tutup