2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-23 18:38:01 +00:00

Update examples/replyToMessage.js with force_reply

This commit is contained in:
Yago 2016-01-30 18:24:25 +01:00
parent 1b1e8c7bec
commit f10ba246d0

View File

@ -7,7 +7,14 @@ var USER = 'USER_ID';
var bot = new TelegramBot(TOKEN, {polling: {timeout: 1, interval: 100}}); var bot = new TelegramBot(TOKEN, {polling: {timeout: 1, interval: 100}});
bot.sendMessage(USER, 'How old are you?') var opts = {
reply_markup: JSON.stringify(
{
force_reply: true
}
)};
bot.sendMessage(USER, 'How old are you?', opts)
.then(function (sended) { .then(function (sended) {
var chatId = sended.chat.id; var chatId = sended.chat.id;
var messageId = sended.message_id; var messageId = sended.message_id;