From b2f376a9067348be6791fd6ee8080adb0ff76836 Mon Sep 17 00:00:00 2001 From: eternnoir Date: Thu, 30 Nov 2017 23:34:07 +0800 Subject: [PATCH] Remove debug message. Add content_type --- setup.py | 2 +- telebot/apihelper.py | 1 - telebot/types.py | 5 +++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a5d06f7..6c78ce9 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ def readme(): return f.read() setup(name='pyTelegramBotAPI', - version='3.5.0', + version='3.5.1', description='Python Telegram bot api. ', long_description=readme(), author='eternnoir', diff --git a/telebot/apihelper.py b/telebot/apihelper.py index 6b52f72..8dd78c3 100644 --- a/telebot/apihelper.py +++ b/telebot/apihelper.py @@ -258,7 +258,6 @@ def send_photo(token, chat_id, photo, caption=None, reply_to_message_id=None, re def send_media_group(token, chat_id, media, disable_notification=None, reply_to_message_id=None): method_url = r'sendMediaGroup' media_json = _convert_list_json_serializable(media) - print(media_json) payload = {'chat_id': chat_id, 'media': media_json} if disable_notification: payload['disable_notification'] = disable_notification diff --git a/telebot/types.py b/telebot/types.py index 32d9874..1621b1e 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -333,10 +333,13 @@ class Message(JsonDeserializable): content_type = 'left_chat_member' if 'new_chat_title' in obj: opts['new_chat_title'] = obj['new_chat_title'] + content_type = 'new_chat_title' if 'new_chat_photo' in obj: opts['new_chat_photo'] = Message.parse_photo(obj['new_chat_photo']) + content_type = 'new_chat_photo' if 'delete_chat_photo' in obj: opts['delete_chat_photo'] = obj['delete_chat_photo'] + content_type = 'delete_chat_photo' if 'group_chat_created' in obj: opts['group_chat_created'] = obj['group_chat_created'] content_type = 'group_chat_created' @@ -348,8 +351,10 @@ class Message(JsonDeserializable): content_type = 'channel_chat_created' if 'migrate_to_chat_id' in obj: opts['migrate_to_chat_id'] = obj['migrate_to_chat_id'] + content_type = 'migrate_to_chat_id' if 'migrate_from_chat_id' in obj: opts['migrate_from_chat_id'] = obj['migrate_from_chat_id'] + content_type = 'migrate_from_chat_id' if 'pinned_message' in obj: opts['pinned_message'] = Message.de_json(obj['pinned_message']) content_type = 'pinned_message'