Eleirbag89 / TelegramBotPHP

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

How to get user_id of the message of a user I reply to? #292

Closed teflontoni closed 11 months ago

teflontoni commented 11 months ago

So I want to do stuff with a users ID if I answer with a command to a message from a user in my group...

Alas I have no clue

$id = $data['message']['reply_to_message']['id'];

Doesn't do the trick, as ['id'] isn't set.

I tried to figure this out by myself, but with no luck. Any help/pointers are appreciated.

teflontoni commented 11 months ago

For posterity:

$id = $data['message']['reply_to_message']['from']['id'];

did the trick.