Answer the question
In order to leave comments, you need to log in
How to get values ​​after post?
How can the bot get the values ​​after the "submit" message. Bot receives messages: send (currency) (amount)
For example: send euro 500 and the bot should receive two values ​​(currency) and (amount)
Answer the question
In order to leave comments, you need to log in
All data in message.text. Split by split and take what you need
Accordingly, for the case of "send euro 500" you need to take everything except the first element
. Only it is worth adding checks (depending on the planned work logic) in case the parameters are not specified.
Also, aiogram has its own method, message.get_args() returning a string of arguments, but it will return a string, which will also need to be split by split()
currency, amount = message.text.split()[1:]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question