A
A
arybak20172019-04-11 22:03:13
PHP
arybak2017, 2019-04-11 22:03:13

How to set unknown text in the bot command for Telegram?

Hello, I'm making a bot for TG. I use switch($text) to process the user's command, where $text is the text of the message. There is a /invoice command (any numbers). Serves to replenish the balance. The essence of the question is how to correctly set these numbers for the handler. I looked in the direction of regular expressions, it is not entirely clear how to write them correctly. Tell me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2019-04-12
@Sanasol

It is necessary to separate the concept of command and arguments, otherwise you will not come to anything normal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question