skip to Main Content

So when a user sends a message to my bot, I send a message back asking for more information and set the reply_to_message field to the original message by the user (as described in the Telegram BOT API)

Once the user then replies back to my question, I try to check for the reply_to_messsage to extract the original message but it doesn’t exist.

Am I doing something wrong?

2

Answers


  1. What you’re looking for is the ForceReply.

    If you use that, you can find your original message in the reply_to_message

    Login or Signup to reply.
  2. $message_reply=$update->message->reply_to_message; // if(message_reply) == true
    $message_reply_message_text=$update->message->reply_to_message->text;
    $message_reply_message_caption=$update->message->reply_to_message->caption; // text for picture

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search