From e97e3060f74d6f968bb6d5a1e9fae422c63318d4 Mon Sep 17 00:00:00 2001 From: Zakhar Izmaylov Date: Thu, 23 Jan 2025 14:43:39 +0300 Subject: [PATCH] Add inline button for user profile in admin panel message processing. Enhanced user interaction by including a button that directs users to their personal account, improving the overall user experience. --- handlers/admin/admin_panel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/handlers/admin/admin_panel.py b/handlers/admin/admin_panel.py index e3cfb0ba..96686fa1 100644 --- a/handlers/admin/admin_panel.py +++ b/handlers/admin/admin_panel.py @@ -347,7 +347,10 @@ async def process_message_to_all(message: types.Message, state: FSMContext, sess for record in tg_ids: tg_id = record["tg_id"] try: - await bot.send_message(chat_id=tg_id, text=text_message) + # Создаем кнопку для личного кабинета + builder = InlineKeyboardBuilder() + builder.row(InlineKeyboardButton(text="👤 Личный кабинет", callback_data="profile")) + await bot.send_message(chat_id=tg_id, text=text_message, reply_markup=builder.as_markup()) success_count += 1 except Exception as e: error_count += 1