node-telegram-bot-api
Advanced tools
Comparing version 0.20.0 to 0.20.1
@@ -10,3 +10,10 @@ 'use strict'; | ||
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) { | ||
@@ -13,0 +20,0 @@ var chatId = sended.chat.id; |
{ | ||
"name": "node-telegram-bot-api", | ||
"version": "0.20.0", | ||
"version": "0.20.1", | ||
"description": "Telegram Bot API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -79,3 +79,3 @@ [![Build Status](https://travis-ci.org/yagop/node-telegram-bot-api.svg?branch=master)](https://travis-ci.org/yagop/node-telegram-bot-api) [![Build status](https://ci.appveyor.com/api/projects/status/ujko6bsum3g5msjh/branch/master?svg=true)](https://ci.appveyor.com/project/yagop/node-telegram-bot-api/branch/master) [![Coverage Status](https://coveralls.io/repos/yagop/node-telegram-bot-api/badge.svg?branch=master)](https://coveralls.io/r/yagop/node-telegram-bot-api?branch=master) [![bitHound Score](https://www.bithound.io/github/yagop/node-telegram-bot-api/badges/score.svg)](https://www.bithound.io/github/yagop/node-telegram-bot-api) [![https://telegram.me/node_telegram_bot_api](https://img.shields.io/badge/💬 Telegram-node__telegram__bot__api-blue.svg)](https://telegram.me/node_telegram_bot_api) [![https://telegram.me/Yago_Perez](https://img.shields.io/badge/💬 Telegram-Yago__Perez-blue.svg)](https://telegram.me/Yago_Perez) | ||
* [.onText(regexp, callback)](#TelegramBot+onText) | ||
* [.onReplyToMessage(messageId, callback)](#TelegramBot+onReplyToMessage) | ||
* [.onReplyToMessage(chatId, messageId, callback)](#TelegramBot+onReplyToMessage) | ||
@@ -94,3 +94,3 @@ <a name="new_TelegramBot_new"></a> | ||
| [options.polling] | <code>Boolean</code> | <code>Object</code> | <code>false</code> | Set true to enable polling or set options | | ||
| [options.polling.timeout] | <code>String</code> | <code>Number</code> | <code>4</code> | Polling time | | ||
| [options.polling.timeout] | <code>String</code> | <code>Number</code> | <code>10</code> | Polling time in seconds | | ||
| [options.polling.interval] | <code>String</code> | <code>Number</code> | <code>2000</code> | Interval between requests in miliseconds | | ||
@@ -348,3 +348,3 @@ | [options.webHook] | <code>Boolean</code> | <code>Object</code> | <code>false</code> | Set true to enable WebHook or set options | | ||
<a name="TelegramBot+onReplyToMessage"></a> | ||
### telegramBot.onReplyToMessage(messageId, callback) | ||
### telegramBot.onReplyToMessage(chatId, messageId, callback) | ||
Register a reply to wait for a message response. | ||
@@ -356,5 +356,6 @@ | ||
| --- | --- | --- | | ||
| messageId | <code>Number</code> | <code>String</code> | The ID of the message to be replied | | ||
| chatId | <code>Number</code> | <code>String</code> | The chat id where the message cames from. | | ||
| messageId | <code>Number</code> | <code>String</code> | The message id to be replied. | | ||
| callback | <code>function</code> | Callback will be called with the reply message. | | ||
* * * |
@@ -29,3 +29,3 @@ 'use strict'; | ||
* @param {Boolean|Object} [options.polling=false] Set true to enable polling or set options | ||
* @param {String|Number} [options.polling.timeout=4] Polling time | ||
* @param {String|Number} [options.polling.timeout=10] Polling time in seconds | ||
* @param {String|Number} [options.polling.interval=2000] Interval between requests in miliseconds | ||
@@ -569,3 +569,4 @@ * @param {Boolean|Object} [options.webHook=false] Set true to enable WebHook or set options | ||
* Register a reply to wait for a message response. | ||
* @param {Number|String} messageId The ID of the message to be replied | ||
* @param {Number|String} chatId The chat id where the message cames from. | ||
* @param {Number|String} messageId The message id to be replied. | ||
* @param {Function} callback Callback will be called with the reply | ||
@@ -572,0 +573,0 @@ * message. |
@@ -43,2 +43,3 @@ 'use strict'; | ||
debug('polling error: %j', err); | ||
throw err; | ||
}) | ||
@@ -45,0 +46,0 @@ .finally(function () { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
570768
1258
358