mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Update types.py
Added 'json' property to class 'Message', to quickly save a message to the database
This commit is contained in:
parent
dadcd5a577
commit
c11a9f810c
@ -369,7 +369,7 @@ class Message(JsonDeserializable):
|
||||
if 'connected_website' in obj:
|
||||
opts['connected_website'] = obj['connected_website']
|
||||
content_type = 'connected_website'
|
||||
return cls(message_id, from_user, date, chat, content_type, opts)
|
||||
return cls(message_id, from_user, date, chat, content_type, opts, json)
|
||||
|
||||
@classmethod
|
||||
def parse_chat(cls, chat):
|
||||
@ -436,6 +436,7 @@ class Message(JsonDeserializable):
|
||||
self.connected_website = None
|
||||
for key in options:
|
||||
setattr(self, key, options[key])
|
||||
self.json = json
|
||||
|
||||
|
||||
class MessageEntity(JsonDeserializable):
|
||||
|
Loading…
Reference in New Issue
Block a user