From c7675c231fbacfb7c4e308d01d4a5878ce7b2e38 Mon Sep 17 00:00:00 2001 From: StNicolay Date: Tue, 3 Jan 2023 21:07:37 +0300 Subject: [PATCH] Fixed sending a final message in /import --- src/bot/message_handlers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bot/message_handlers.py b/src/bot/message_handlers.py index ab4de46..d7a8a85 100644 --- a/src/bot/message_handlers.py +++ b/src/bot/message_handlers.py @@ -650,11 +650,12 @@ async def _import3( failed.append(account.name) if failed: - mes_text = "Не удалось добавить:\n" + "\n".join(failed) + await send_deleteable_message( + bot, mes.chat.id, "Не удалось добавить:\n" + "\n".join(failed) + ) else: - mes_text = "Успех" + await send_tmp_message(bot, mes.chat.id, "Успех") - await send_tmp_message(bot, mes.chat.id, mes_text, 10) del text, mes, accounts gc.collect()