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