diff --git a/bot.py b/bot.py index 9797ca6a..2fc73df3 100644 --- a/bot.py +++ b/bot.py @@ -48,12 +48,14 @@ async def errors_handler( caption=f"{hbold(type(event.exception).__name__)}: {str(event.exception)[:1021]}...", ) try: - from handlers.start import start_command, handle_start_callback_query - + from handlers.start import handle_start_callback_query, start_command + if event.update.message: await start_command(event.update.message, state=dp.storage, session=None, admin=False, captcha=False) elif event.update.callback_query: - await handle_start_callback_query(event.update.callback_query, state=dp.storage, session=None, admin=False, captcha=False) + await handle_start_callback_query( + event.update.callback_query, state=dp.storage, session=None, admin=False, captcha=False + ) except Exception as e: logger.error(f"Ошибка при показе стартового меню после ошибки: {e}") except TelegramBadRequest as exception: