From 80a525e51b6a87f62e9689ae954bcb35211aff34 Mon Sep 17 00:00:00 2001 From: dkizima Date: Mon, 30 Mar 2026 14:21:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=BF=D1=83=D1=81=D0=BA=20?= =?UTF-8?q?=D0=BF=D1=83=D1=81=D1=82=D1=8B=D1=85=20=D0=B2=D0=BB=D0=BE=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=BA=D0=BB=D0=B0=D0=B2=D0=B8=D0=B0?= =?UTF-8?q?=D1=82=D1=83=D1=80=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- maxapi/methods/send_message.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/maxapi/methods/send_message.py b/maxapi/methods/send_message.py index 1472ebe..181224e 100644 --- a/maxapi/methods/send_message.py +++ b/maxapi/methods/send_message.py @@ -134,6 +134,14 @@ async def fetch(self) -> SendedMessage | None: if self.attachments: for att in self.attachments: + if ( + isinstance(att, Attachment) + and str(att.type) == "inline_keyboard" + and hasattr(att.payload, "buttons") + and not any(att.payload.buttons) + ): + continue + if isinstance(att, (InputMedia, InputMediaBuffer)): has_input_media = True