L
L
lololo_eb2018-04-08 17:00:24
PHP
lololo_eb, 2018-04-08 17:00:24

How to get command argument?

At the moment, I will decode the commands by comparing message / text with the commands prescribed in the check. But how to get the command argument? For example, if the bot receives the /test 123 command, how to get 123 separately?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Entelis, 2018-04-08
@lololo_eb

Parse what comes to you through php.net/manual/ru/function.preg-match.php
Well, or use some framework for bots.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question