diff --git a/handlers/start.py b/handlers/start.py index 9746aff0..91786679 100644 --- a/handlers/start.py +++ b/handlers/start.py @@ -43,6 +43,7 @@ from handlers.captcha import generate_captcha from handlers.coupons import activate_coupon from handlers.payments.gift import handle_gift_link from handlers.profile import process_callback_view_profile +from hooks.hook_buttons import insert_hook_buttons from handlers.texts import ( NOT_SUBSCRIBED_YET_MSG, SUBSCRIPTION_CHECK_ERROR_MSG, @@ -244,6 +245,13 @@ async def show_start_menu(message: Message, admin: bool, session: AsyncSession): if admin: kb.row(InlineKeyboardButton(text="πŸ“Š Администратор", callback_data=AdminPanelCallback(action="admin").pack())) + # Кнопки ΠΈΠ· ΠΌΠΎΠ΄ΡƒΠ»Π΅ΠΉ (Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€, "Π’ΠΎΠΏ ΠΏΡ€ΠΈΠ³Π»Π°ΡΠΈΠ²ΡˆΠΈΡ…") + try: + module_buttons = await run_hooks("start_menu", chat_id=message.chat.id, session=session) + kb = insert_hook_buttons(kb, module_buttons) + except Exception as e: + logger.error(f"[Hooks:start_menu] Ошибка вставки ΠΊΠ½ΠΎΠΏΠΎΠΊ: {e}") + kb.row(InlineKeyboardButton(text=ABOUT_VPN, callback_data="about_vpn")) await edit_or_send_message(message, WELCOME_TEXT, reply_markup=kb.as_markup(), media_path=image_path)