diff --git a/telebot/types.py b/telebot/types.py index 4d6a041..774b526 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -296,6 +296,9 @@ class Message(JsonDeserializable): if 'photo' in obj: opts['photo'] = Message.parse_photo(obj['photo']) content_type = 'photo' + if 'animation' in obj: + opts['animation'] = Animation.de_json(obj['animation']) + content_type = 'animation' if 'sticker' in obj: opts['sticker'] = Sticker.de_json(obj['sticker']) content_type = 'sticker' @@ -421,6 +424,7 @@ class Message(JsonDeserializable): self.contact = None self.location = None self.venue = None + self.animation = None self.new_chat_member = None self.new_chat_members = None self.left_chat_member = None @@ -2056,7 +2060,6 @@ class Sticker(JsonDeserializable): self.mask_position = mask_position self.file_size = file_size - class MaskPosition(JsonDeserializable, JsonSerializable): @classmethod def de_json(cls, json_string):