feat: add /support command and improve fallback message
- Add `/support` command handler to initiate support flow via direct command (previously only accessible via callback button) - Update `UNDEFINED_MESSAGE` to guide users toward `/support` and `/start` when they use undefined commands
This commit is contained in:
@@ -25,6 +25,15 @@ async def support_init(cb: CallbackQuery, state: FSMContext):
|
||||
await state.set_state(SupportStorage.prompt)
|
||||
|
||||
|
||||
@router.message(Command("support"))
|
||||
async def support_init_cmd(msg: Message, state: FSMContext):
|
||||
await state.clear()
|
||||
await msg.delete()
|
||||
|
||||
await msg.answer(text=SUPPORT_INIT, reply_markup=return_to_menu)
|
||||
await state.set_state(SupportStorage.prompt)
|
||||
|
||||
|
||||
@router.message(SupportStorage.prompt)
|
||||
async def received_message(
|
||||
msg: Message, state: FSMContext, session: AsyncSession, deps: DependenciesDTO
|
||||
|
||||
2
texts.py
2
texts.py
@@ -107,7 +107,7 @@ CALLBACK_FALLBACK = "❌ Пакет потерян, попробуйте сно
|
||||
|
||||
CONTEXT_REINITIATED = "🌑 Сессия сброшена. Данные могли обновиться."
|
||||
|
||||
UNDEFINED_MESSAGE = "❌ Таких команд у нас нет. /start если потерялись."
|
||||
UNDEFINED_MESSAGE = "❌ Таких команд у нас нет.\n\n<i>Ищете техподдержку? Вам в /support</i>\n<i>Потерялись? Вам в /start.</i>"
|
||||
|
||||
# ============================================================
|
||||
# РЕФЕРАЛЬНАЯ СИСТЕМА
|
||||
|
||||
Reference in New Issue
Block a user