From 43831d8fa04b58f04a0f025d68d67a6dfcb188e7 Mon Sep 17 00:00:00 2001 From: Gabriel Maia Date: Sun, 27 Oct 2024 21:33:50 -0300 Subject: [PATCH] refactor: bot core --- WinxMusic/core/bot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WinxMusic/core/bot.py b/WinxMusic/core/bot.py index 6dc9b0d3..6f3bb810 100644 --- a/WinxMusic/core/bot.py +++ b/WinxMusic/core/bot.py @@ -11,7 +11,7 @@ from pyrogram.errors import ( ChatSendPhotosForbidden, ChatWriteForbidden, - FloodWait, + FloodWait, MessageIdInvalid, ) from pyrogram.types import ( BotCommand, @@ -50,6 +50,8 @@ async def edit_message_text(self, *args, **kwargs): await asyncio.sleep(time) if time < 25: return await self.edit_message_text(self, *args, **kwargs) + except MessageIdInvalid: + pass async def send_message(self, *args, **kwargs): if kwargs.get("send_direct", False):