![](/img/trans.png)
[英]How do I make my discord bot reply to a specific message with reply from a pool of replies?
[英]How to make Telegram BOT reply to a specific message?
bot.onText(/\/start/, (msg, match)=> {
var text = "hi user welcome to bot"
bot.sendMessage(msg.chat.id,text,{reply_to_message_id: msg.message_id})
})
使用 replay_to_message_id
您需要使用reply_to_message_id
而不是reply_to_msg_id
。
bot.on('message', (msg) => {
const { message_id: originalMessageId, from: { username }, chat: { id: chatId } } = msg;
bot.sendMessage(chatId, `welcome ${username}`, {
reply_to_message_id: originalMessageId
});
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.