node-telegram-bot-api: Failed to receive a reply message with ReplyToMessage
Hi, I’m trying to run a simple test code according to the replyToMessage example and my replyToMessage callback is never called.
var TelegramBot = require('node-telegram-bot-api');
var bot = new TelegramBot(config.botToken, {polling: {timeout: 1, interval: 100}});
var opts = {
reply_markup: JSON.stringify({ force_reply: true }
)};
bot.onText(/\/search/, function (msg) {
var fromId = msg.from.id;
bot.sendMessage(fromId, 'What should I search for?', opts)
.then(function(sended) {
var chatId = sended.chat.id;
var messageId = sended.message_id;
bot.onReplyToMessage(chatId, messageId, function (message) {
console.log('OK. I\'ll search for %s', message.text);
});
})
});
console.log
(in onReplyToMessage callback) is never called…
Am I doing something wrong?
- I’m using 0.21.1
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 20
Please check my replies in this issue: https://github.com/yagop/node-telegram-bot-api/issues/108
Same problem. Only if I manually reply on the message, then callback is being called.