From 2dc33598d80358dd4c8b618cb0d42aa2054f2005 Mon Sep 17 00:00:00 2001
From: Roman Sergienko <romasergienko@outlook.com>
Date: Fri, 04 Dec 2026 08:23:53 +0000
Subject: [PATCH] Use KeyboardButton with web_app for /panel command to open Mini App

---
 cmds.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmds.py b/cmds.py
index 8e4dcc4..4825df8 100644
--- a/cmds.py
+++ b/cmds.py
@@ -1,6 +1,6 @@
 from aiogram import F, types
 from aiogram.filters import Command, CommandObject
-from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup, WebAppInfo
+from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup, WebAppInfo
 
 import db
 import cfg
@@ -106,12 +106,12 @@
     if not await check_perm(message.chat.id, message.from_user.id, P_CFG):
         await message.answer("У вас нет доступа к панели.")
         return
-    keyboard = InlineKeyboardMarkup(inline_keyboard=[[
-        InlineKeyboardButton(
+    keyboard = ReplyKeyboardMarkup(keyboard=[[
+        KeyboardButton(
             text="Открыть панель",
             web_app=WebAppInfo(url=f"{cfg.WEB_BASE_URL}/miniapp?chat_id={message.chat.id}"),
         )
-    ]])
+    ]], one_time_keyboard=True)
     await message.answer("Панель управления чатом:", reply_markup=keyboard)
 
 

--
Gitblit v1.9.3