A
A
Andrey2021-08-24 00:27:50
Python
Andrey, 2021-08-24 00:27:50

How can one handle Telegram bot commands with Python arguments?

After reading the documentation and looking at the functionality of Bot Father, I could not find such information:
How can I write code to read and process this kind of command with an argument;
/mycommand MyName
and the like))

I would be glad for any help!)

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2021-08-24
@Varikorek

If anyone is interested, I found the answer myself, it may be very useful for someone:
https://stackoverflow.com/questions/44637126/comma...

V
veryoriginalnickname, 2021-08-24
@veryoriginalnickname

Can split the string into an array, and use a space as a separator?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question