telegram-bot icon indicating copy to clipboard operation
telegram-bot copied to clipboard

Receiving unexpected behavior while handling Telegram bot commands

Open dev2060 opened this issue 7 years ago • 1 comments
trafficstars

Hello and thank you for this nice software and tips. Following your instructions I am using AWS Lamba as webhook for all messages that comes to telegram bot. However I got an issue. For some reason lambda function does not reply on command first time. Telegram user just has no answer. But it replies every next time on previous request.

I will give and example:

I put command 1. Result: no answer. I put command 2. Result: answer on command 1. I put command 3. Result: answer on command 2 I put command 4. Result: answer on command 3 and so on... what is going wrong?

dev2060 avatar Nov 08 '18 09:11 dev2060

For anyone who may encounter same situation. Replace the last line return processCommand; to return {statusCode: 200}; in index.js solve this problem for me. Still don't know why.

zhewang95 avatar Dec 08 '21 12:12 zhewang95