Skip to content

Commit 8528ca9

Browse files
committed
Add some message content type. Fix eternnoir#426
1 parent e1a3cca commit 8528ca9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎telebot/types.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,16 +339,20 @@ def de_json(cls, json_string):
339339
opts['delete_chat_photo'] = obj['delete_chat_photo']
340340
if 'group_chat_created' in obj:
341341
opts['group_chat_created'] = obj['group_chat_created']
342+
content_type = 'group_chat_created'
342343
if 'supergroup_chat_created' in obj:
343344
opts['supergroup_chat_created'] = obj['supergroup_chat_created']
345+
content_type = 'supergroup_chat_created'
344346
if 'channel_chat_created' in obj:
345347
opts['channel_chat_created'] = obj['channel_chat_created']
348+
content_type = 'channel_chat_created'
346349
if 'migrate_to_chat_id' in obj:
347350
opts['migrate_to_chat_id'] = obj['migrate_to_chat_id']
348351
if 'migrate_from_chat_id' in obj:
349352
opts['migrate_from_chat_id'] = obj['migrate_from_chat_id']
350353
if 'pinned_message' in obj:
351354
opts['pinned_message'] = Message.de_json(obj['pinned_message'])
355+
content_type = 'pinned_message'
352356
if 'invoice' in obj:
353357
opts['invoice'] = Invoice.de_json(obj['invoice'])
354358
content_type = 'invoice'

0 commit comments

Comments
 (0)