Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
807 stars 341 forks source link

Reply to forwarded messages #170

Closed aqilhex closed 5 years ago

aqilhex commented 5 years ago

This

public function ReplyToMessageFromUserID()
{
    return $this->data['message']['reply_to_message']['forward_from']['id'];
}

Return empty string, How can i get sender id of message when i choose to reply it?

Eleirbag89 commented 5 years ago

I don't understand what you want to do. To forward a message you need:

http://eleirbag89.github.io/TelegramBotPHP/class_telegram.html#aebf3d567e947a457971c1501be7fc1fe

https://core.telegram.org/bots/api#forwardmessage

aqilhex commented 5 years ago

I didn't know how to reply to forwarded messages in my robot. But i fortunately could do it. To those who want to reply to messages they get from users inside their robots use this method ['chat_id'=>ReplyToMessageFromUserID(),'text'=>'your message'];