I want to use FSMContext to save information entered by the user in a bot written in aiogram 3.X

36 Views Asked by At

Let's say I have some kind of command. Let it be /start. After entering it, 'Enter a number' is displayed.

The user enters the given number accordingly, and then it is saved in the class. The fact is that it is not necessary to write a number after each command; it is also possible to add text, etc. Please tell me what to do.

class AddProduct(StatesGroup):
    # Шаги состояний
    length = State()
    number = State()
    texts = {
        'AddProduct:length': 'Введите кол-во заново:',
        'AddProduct:number': 'Введите № телефона заново:'
    }
0

There are 0 best solutions below