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:
parent
d0b4bb7c69
commit
b2f376a906
2
setup.py
2
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',
|
||||
|
@ -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
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user