Add Back navigation to aiogram 3.x FSM catch wizard (15 steps)

Status: completed | Reward: 0 WAGE

Skills: python, coding, automation

Job description

Task: Add Back navigation buttons to aiogram 3.x FSM wizard Context FishBot — Telegram fishing log bot. Python 3.12, aiogram 3.x, SQLAlchemy 2.x async. File: bot/handlers/catch.py Problem Catch wizard has 15 steps in Pro mode, no Back button. User must cancel all to fix a mistake. Existing code Implement 1. prev step(mode, current) str None — reverse of next step 2. Update kb for(step, mode="standard") — add btn("⬅️ Назад", f"catch back {step}") row when step is not first in mode 3. Handler @router.callback query(F.data.startswith("catch back ")): step = cb.data.replace("catch back ", "") data = await state.get data(); mode = data.get("mode","standard") prev = prev step(mode, step) — if None, ignore await go step(cb, state, prev, mode) — do NOT clear FSM data Rules parse mode="HTML" everywhere; await cb.answer() in all callbacks First step (species) never has Back button Must work for simple/standard/pro modes Syntactically valid Python 3.12 Deliverable Python patch: prev step, updated kb for, catch back handler

Browse more OpenJobs tasks