From eeff4e7bf815ec2fd261a418cce18e14aed87513 Mon Sep 17 00:00:00 2001 From: eternnoir Date: Tue, 22 Dec 2015 14:18:23 +0800 Subject: [PATCH] Let message all attribute default be None. #100 --- telebot/types.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/telebot/types.py b/telebot/types.py index c262663..71db219 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -233,6 +233,25 @@ class Message(JsonDeserializable): self.from_user = from_user self.message_id = message_id self.content_type = content_type + self.forward_from = None + self.forward_date = None + self.reply_to_message = None + self.text = None + self.audio = None + self.voice = None + self.document = None + self.photo = None + self.sticker = None + self.video = None + self.location = None + self.contact = None + self.new_chat_participant = None + self.left_chat_participant = None + self.new_chat_title = None + self.new_chat_photo = None + self.delete_chat_photo = None + self.group_chat_created = None + self.caption = None for key in options: setattr(self, key, options[key])