From b172faf89f1d523a92173951a9be0f608cc68817 Mon Sep 17 00:00:00 2001 From: Bunk100 <37146584+Bunk100@users.noreply.github.com> Date: Sat, 12 Oct 2019 18:22:44 +0300 Subject: [PATCH] Update message.py --- aiogram/types/message.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 819199ca..6612b22a 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -1582,7 +1582,7 @@ class Message(base.TelegramObject): :param parse_mode: :return: """ - kwargs = {"chat_id": chat_id, "reply_markup": self.reply_markup} + kwargs = {"chat_id": chat_id, "reply_markup": reply_markup or self.reply_markup} text = self.text or self.caption if disable_notification is not None: @@ -1595,8 +1595,6 @@ class Message(base.TelegramObject): text = self.html_text if (self.text or self.caption) else None if parse_mode == 'markdown': text = self.md_text if (self.text or self.caption) else None - if reply_markup: - kwargs["reply_markup"] = reply_markup if self.text: return await self.bot.send_message(text=text, **kwargs)