Closed DarrylSSY closed 2 years ago
How do you get the id of the message you want to reply to? the forwarded messages have a forward_date field and a forward_from object
this._bot.on('message', msg=>{
if (msg.forward_from && msg.forward_date) {
this._bot.sendMessage(msg.chat.id, 'Im replied you', { reply_to_message_id: msg.message_id } )
} else {
// its a regular chat message
}
Hi, I am attempting to get my bot to chat in a discussion channel. For that to work, I will have to get it to reply to a particular message in the chat, and that message happens to be a forwarded message. However, when I use the chat ID and the message ID, it simply does not reply to the correct message (it is like the message does not exist and it replies to something before it). How can I possibly get it to reply to forwarded messages?