From 99ede83611ab698cd983e1bf756e84a9baef2732 Mon Sep 17 00:00:00 2001 From: Who? <155328415+coddrago@users.noreply.github.com> Date: Sun, 24 Aug 2025 10:05:20 +0000 Subject: [PATCH] test close btn --- heroku/inline/types.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/heroku/inline/types.py b/heroku/inline/types.py index 805b72a..f92d7d9 100644 --- a/heroku/inline/types.py +++ b/heroku/inline/types.py @@ -55,10 +55,15 @@ class InlineMessage: ) async def delete(self) -> bool: - return await self.inline_manager._delete_unit_message( - self, - unit_id=self.unit_id, - ) + entity = self._units.get(self.unit_id) + if not entity: + return await self.original_call.answer("msg not found", show_alert=True) + + msgid = entity.get("message_id") + cid = entity.get("chat") + + await self.inline._client.delete_messages(cid, msgid) + return await self.original_call.answer("") async def unload(self) -> bool: return await self.inline_manager._unload_unit(unit_id=self.unit_id)