From be3b6f88e8f729bf68a3577cbd937a138c835b0f Mon Sep 17 00:00:00 2001 From: Taha Date: Sun, 14 Jul 2019 18:53:59 +0430 Subject: [PATCH] Added Animation --- telebot/types.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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):