monkey patch for https://github.com/yagop/node-telegram-bot-api
npm install monkey-patches-node-telegram-bot-api```
npm i monkey-patches-node-telegram-bot-api --save --save-exact
`js
var options = {/ ... /};
TelegramBot = require('node-telegram-bot-api');
require('monkey-patches-node-telegram-bot-api')(TelegramBot, options);
var token = 'YOUR_TELEGRAM_BOT_TOKEN';
var bot = new TelegramBot(token, {polling: true});
`
js
options = {all: true};
// setup bot ...
// usage
bot.stopPolling();
// ...
`stopPolling
With this option you can stop polling.
`js
options = {stopPolling: true};
// setup bot ...
// usage
bot.stopPolling(); // stop
bot.initPolling(); // start
bot.initPolling(); // restart
`
emitUpdate
this path cause update-event emitted every time update received
`js
options = {emitUpdate: true};
// setup bot ...
// usage
bot.on('update', function(update){/ ... /})
`
emitCallbackQuery
Removed: update your node-telegram-bot-apisendVenue
With this option you can send venue.
`js
options = {sendVenue: true};
// setup bot ...
// usage
bot.sendVenue(chatID, lat, long, title, address);
`
kickChatMember
Removed: update your node-telegram-bot-apiunbanChatMember
Removed: update your node-telegram-bot-apianswerCallbackQuery
Removed: update your node-telegram-bot-apieditMessageText
Removed: update your node-telegram-bot-apieditMessageCaption
Removed: update your node-telegram-bot-apieditMessageReplyMarkup
Removed: update your node-telegram-bot-apiCompatibility
I test this package with
node-telegram-bot-api@0.23.3 and node@v5.3.0Sem version, backward compatibility and ...
No. this is only :monkey_face: patch. so every time install this package with --save-exact` option.