1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Remove debug message. Add content_type

This commit is contained in:
eternnoir 2017-11-30 23:34:07 +08:00
parent d0b4bb7c69
commit b2f376a906
3 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,7 @@ def readme():
return f.read() return f.read()
setup(name='pyTelegramBotAPI', setup(name='pyTelegramBotAPI',
version='3.5.0', version='3.5.1',
description='Python Telegram bot api. ', description='Python Telegram bot api. ',
long_description=readme(), long_description=readme(),
author='eternnoir', author='eternnoir',

View File

@ -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): def send_media_group(token, chat_id, media, disable_notification=None, reply_to_message_id=None):
method_url = r'sendMediaGroup' method_url = r'sendMediaGroup'
media_json = _convert_list_json_serializable(media) media_json = _convert_list_json_serializable(media)
print(media_json)
payload = {'chat_id': chat_id, 'media': media_json} payload = {'chat_id': chat_id, 'media': media_json}
if disable_notification: if disable_notification:
payload['disable_notification'] = disable_notification payload['disable_notification'] = disable_notification

View File

@ -333,10 +333,13 @@ class Message(JsonDeserializable):
content_type = 'left_chat_member' content_type = 'left_chat_member'
if 'new_chat_title' in obj: if 'new_chat_title' in obj:
opts['new_chat_title'] = obj['new_chat_title'] opts['new_chat_title'] = obj['new_chat_title']
content_type = 'new_chat_title'
if 'new_chat_photo' in obj: if 'new_chat_photo' in obj:
opts['new_chat_photo'] = Message.parse_photo(obj['new_chat_photo']) opts['new_chat_photo'] = Message.parse_photo(obj['new_chat_photo'])
content_type = 'new_chat_photo'
if 'delete_chat_photo' in obj: if 'delete_chat_photo' in obj:
opts['delete_chat_photo'] = obj['delete_chat_photo'] opts['delete_chat_photo'] = obj['delete_chat_photo']
content_type = 'delete_chat_photo'
if 'group_chat_created' in obj: if 'group_chat_created' in obj:
opts['group_chat_created'] = obj['group_chat_created'] opts['group_chat_created'] = obj['group_chat_created']
content_type = 'group_chat_created' content_type = 'group_chat_created'
@ -348,8 +351,10 @@ class Message(JsonDeserializable):
content_type = 'channel_chat_created' content_type = 'channel_chat_created'
if 'migrate_to_chat_id' in obj: if 'migrate_to_chat_id' in obj:
opts['migrate_to_chat_id'] = obj['migrate_to_chat_id'] opts['migrate_to_chat_id'] = obj['migrate_to_chat_id']
content_type = 'migrate_to_chat_id'
if 'migrate_from_chat_id' in obj: if 'migrate_from_chat_id' in obj:
opts['migrate_from_chat_id'] = obj['migrate_from_chat_id'] opts['migrate_from_chat_id'] = obj['migrate_from_chat_id']
content_type = 'migrate_from_chat_id'
if 'pinned_message' in obj: if 'pinned_message' in obj:
opts['pinned_message'] = Message.de_json(obj['pinned_message']) opts['pinned_message'] = Message.de_json(obj['pinned_message'])
content_type = 'pinned_message' content_type = 'pinned_message'