I’m working on a Telegram Bot that must respond to user replies. Here’s what I’m trying to do:
User 1: What's the weather like?
User 2: (Replying to User 1) /forecast London
While my bot correctly receives the command and the city name, it doesn’t capture the original message content about the weather. The documentation suggests using reply_to_message
, but my webhook logs don’t show it at all.
Below is a sample of the JSON I received:
{
"update_id": 1234567,
"message": {
"message_id": 89,
"from": {
"id": 987654321,
"first_name": "User 2",
"username": "weather_fan"
},
"chat": {
"id": -100123456789,
"title": "Weather Chat",
"type": "group"
},
"date": 1634567890,
"text": "/forecast London",
"entities": [
{
"type": "bot_command",
"offset": 0,
"length": 9
}
]
}
}
Am I overlooking something? I would appreciate any advice on how to access the original message.