From 7b007dab995f7a89dcbf7fde93cbe0073ec2796f Mon Sep 17 00:00:00 2001 From: eternnoir Date: Thu, 14 Apr 2016 11:02:19 +0800 Subject: [PATCH] Add venue to message type. --- telebot/types.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/telebot/types.py b/telebot/types.py index 25ae282..1e2ebe8 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -179,12 +179,15 @@ class Message(JsonDeserializable): content_type = 'voice' if 'caption' in obj: opts['caption'] = obj['caption'] - if 'location' in obj: - opts['location'] = Location.de_json(obj['location']) - content_type = 'location' if 'contact' in obj: opts['contact'] = Contact.de_json(json.dumps(obj['contact'])) content_type = 'contact' + if 'location' in obj: + opts['location'] = Location.de_json(obj['location']) + content_type = 'location' + if 'venue' in obj: + opts['venue'] = Venue.de_json(obj['venue']) + content_type = 'venue' if 'new_chat_participant' in obj: opts['new_chat_participant'] = User.de_json(obj['new_chat_participant']) content_type = 'new_chat_participant'