如何在PHP Telegram Bot中获取用户的非命令答案?

I am writing a new Bot for Telegram for the first time using PHP Telegram Bot.
Imagine I want to show What is your name? for /start command and wait for user's answer, wait for user's answer and then show Hello USER_NAME to him.

I could implement /start commands. But how can I get user's reply that is not in form of /command? Actually I need a listener to a non-command message.

Is there anyone who can help me?

Goto @BotFather, and turn off privacy mode

/setprivacy — Set which messages your bot will receive when added to a group. With privacy mode disabled, the bot will receive all messages.

Mohammad Jan,

You should do it yourself. I suggest you to store the chats in a database table and then store the next command in a column for each chat.

Lets say after /start you're looking for the name of user so you will store /name into the next_command column and whenever you receive a normal message without any /command, then you can check the next_command column and consider the message received as an answer to "What's your name?" question.

You can continue this process to get the full data from the user. For example after getting the name you can ask "How old are you?" and change next_command to /old and then consider the next message as an answer for the previous question.

BTW, It's just a suggestion. You should be able to find the way that is suitable for you. But what is obvious, you should do it yourself since telegram only provide messages to your bot and it's your bot that manage them.

Hope it helps.