Skip to content

Commit 7b007da

Browse files
committed
Add venue to message type.
1 parent 8316a57 commit 7b007da

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎telebot/types.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,15 @@ def de_json(cls, json_string):
179179
content_type = 'voice'
180180
if 'caption' in obj:
181181
opts['caption'] = obj['caption']
182-
if 'location' in obj:
183-
opts['location'] = Location.de_json(obj['location'])
184-
content_type = 'location'
185182
if 'contact' in obj:
186183
opts['contact'] = Contact.de_json(json.dumps(obj['contact']))
187184
content_type = 'contact'
185+
if 'location' in obj:
186+
opts['location'] = Location.de_json(obj['location'])
187+
content_type = 'location'
188+
if 'venue' in obj:
189+
opts['venue'] = Venue.de_json(obj['venue'])
190+
content_type = 'venue'
188191
if 'new_chat_participant' in obj:
189192
opts['new_chat_participant'] = User.de_json(obj['new_chat_participant'])
190193
content_type = 'new_chat_participant'

0 commit comments

Comments
 (0)