3
3
3epo2022-04-18 15:27:55
Bots
3epo, 2022-04-18 15:27:55

How to make dynamic FSM in aiogram?

There is a bot for creating an application. The first message of the bot using the FSM in which it waits for the first message. Let's say that the user wrote a message, after which a message from the bot appears in which there are two in-line buttons with the completion of the text of the application (after clicking on it, the message is sent for consideration) or the second button, after clicking on which the user can add a description of the application. The description can include an attached file, audio, or image.
The problem is that I don't understand how to implement the loop, because the user might want to add 3 text messages, 5 pictures and 2 audio. Is it possible to dynamically create a separate state for each message from the user?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question