Skip to content

Commit

Permalink
Remove debug message. Add content_type
Browse files Browse the repository at this point in the history
  • Loading branch information
eternnoir committed Nov 30, 2017
1 parent d0b4bb7 commit b2f376a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion telebot/apihelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions telebot/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,13 @@ def de_json(cls, json_string):
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'
Expand All @@ -348,8 +351,10 @@ def de_json(cls, json_string):
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'
Expand Down

0 comments on commit b2f376a

Please sign in to comment.