class Form(StatesGroup):
number = State()
@dp.message_handler(state=Form.number)
async def process_number(message: types.Message, state: FSMContext):
if message.text != “0”:
await message.reply(message.text)
else:
await state.finish()