From 6832c337333536f39a500c7bccc1b354633189c8 Mon Sep 17 00:00:00 2001 From: meoww-bot <14239840+meoww-bot@users.noreply.github.com> Date: Mon, 31 Aug 2020 12:00:56 +0000 Subject: [PATCH] feat: Added the field reply_markup to the Message Added the field `reply_markup` to the Message object --- telebot/types.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/telebot/types.py b/telebot/types.py index 8597101..e44d6b5 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -385,6 +385,9 @@ class Message(JsonDeserializable): if 'passport_data' in obj: opts['passport_data'] = obj['passport_data'] content_type = 'passport_data' + if 'reply_markup' in obj: + opts['reply_markup'] = InlineKeyboardMarkup.de_json(obj['reply_markup']) + content_type = 'reply_markup' return cls(message_id, from_user, date, chat, content_type, opts, json_string) @classmethod @@ -455,6 +458,7 @@ class Message(JsonDeserializable): self.invoice = None self.successful_payment = None self.connected_website = None + self.reply_markup = None for key in options: setattr(self, key, options[key]) self.json = json_string