0

I'm trying to get answers from users without sending any button, but when I just send $reply_markup['force_reply'] = true; within the message, the reply is not coming with callback_query. How can I understand the user answering my question?

Are there any other ways to ask questions and get an answer from users without sending any button or customized keyboard?

For example, I'm asking; What is your name?

MeteG
  • 1

1 Answers1

0

The replies to bot's messages are not received as callback queries. You need to check if the user's message is a reply (has reply_to_message_id). And then, get message text using it's message id. If it is the question you asked, it means it has been answered.

However, a better solution would be creating a database table or JSON file with message history of each user.

Brian B
  • 80
  • 1
  • 9