minor improvements

This commit is contained in:
Vladless
2025-02-21 22:36:03 +03:00
parent c9e791fa76
commit 769f5eaf9a
18 changed files with 2459 additions and 1990 deletions
+10 -1
View File
@@ -15,7 +15,16 @@ async def handle_admin_callback_query(callback_query: CallbackQuery, state: FSMC
text = f"🤖 Панель администратора\n📌 Версия бота: {version}"
await state.clear()
await callback_query.message.edit_text(text=text, reply_markup=build_panel_kb())
if callback_query.message.text:
await callback_query.message.edit_text(text=text, reply_markup=build_panel_kb())
else:
try:
await callback_query.message.delete()
except Exception as e:
print(f"Ошибка при удалении сообщения: {e}")
await callback_query.message.answer(text=text, reply_markup=build_panel_kb())
@router.callback_query(F.data == "admin", IsAdminFilter())