feat: update support keyboard with new support URL and replace return to menu button
This commit is contained in:
@@ -5,7 +5,7 @@ from aiogram.filters import Command
|
|||||||
from aiogram.fsm.context import FSMContext
|
from aiogram.fsm.context import FSMContext
|
||||||
from aiogram.types import CallbackQuery, Message
|
from aiogram.types import CallbackQuery, Message
|
||||||
|
|
||||||
from keyboards.client import return_to_menu
|
from keyboards.client import support_url_kb
|
||||||
from texts import SUPPORT_INIT
|
from texts import SUPPORT_INIT
|
||||||
|
|
||||||
router = Router()
|
router = Router()
|
||||||
@@ -16,7 +16,7 @@ logger = logging.getLogger(__name__)
|
|||||||
async def support_init(cb: CallbackQuery, state: FSMContext):
|
async def support_init(cb: CallbackQuery, state: FSMContext):
|
||||||
await state.clear()
|
await state.clear()
|
||||||
|
|
||||||
await cb.message.edit_text(text=SUPPORT_INIT, reply_markup=return_to_menu)
|
await cb.message.edit_text(text=SUPPORT_INIT, reply_markup=support_url_kb)
|
||||||
|
|
||||||
|
|
||||||
@router.message(Command("support"))
|
@router.message(Command("support"))
|
||||||
@@ -24,4 +24,4 @@ async def support_init_cmd(msg: Message, state: FSMContext):
|
|||||||
await state.clear()
|
await state.clear()
|
||||||
await msg.delete()
|
await msg.delete()
|
||||||
|
|
||||||
await msg.answer(text=SUPPORT_INIT, reply_markup=return_to_menu)
|
await msg.answer(text=SUPPORT_INIT, reply_markup=support_url_kb)
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ close_kb: InlineKeyboardMarkup = InlineKeyboardBuilder(
|
|||||||
[[InlineKeyboardButton(text="❌", callback_data="delete")]]
|
[[InlineKeyboardButton(text="❌", callback_data="delete")]]
|
||||||
).as_markup()
|
).as_markup()
|
||||||
|
|
||||||
|
support_url_kb: InlineKeyboardMarkup = InlineKeyboardBuilder(
|
||||||
|
[
|
||||||
|
[InlineKeyboardButton(text="✍️ Перейти в поддержку", url="https://t.me/maleniasupportbot")],
|
||||||
|
[_return_to_menu_btn],
|
||||||
|
]
|
||||||
|
).as_markup()
|
||||||
|
|
||||||
|
|
||||||
def _return_btn(data: str = "menu:main", text: str = "⬅️ Назад") -> InlineKeyboardButton:
|
def _return_btn(data: str = "menu:main", text: str = "⬅️ Назад") -> InlineKeyboardButton:
|
||||||
return InlineKeyboardButton(text=text, callback_data=data)
|
return InlineKeyboardButton(text=text, callback_data=data)
|
||||||
|
|||||||
Reference in New Issue
Block a user