diff --git a/README.md b/README.md index 6f696b6..8cb92b8 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ If you are cloning this repository, remember to run `npm install` to install dep If you are looking for a real-life example of a bot written using this module, see [mdibaiee/webdevrobot](https://github.com/mdibaiee/webdevrobot). -[**Documentation**](https://github.com/mdibaiee/node-telegram-api/wiki) +[Documentation](https://github.com/mdibaiee/node-telegram-api/wiki) +============== Example ======= @@ -51,6 +52,12 @@ bot.command('weather [date]', function(message) { }) ``` +Bots using this module +====================== + +[@webdevrobot](https://telegram.me/webdevrobot) => [mdibaiee/webdevrobot](https://github.com/mdibaiee/webdevrobot) +[@metagon_bot](https://telegram.me/metagon_bot) => [austinhuang0131/metagon](https://github.com/austinhuang0131/metagon) + Todo ==== - [x] Webhook support (not tested, see [#4](https://github.com/mdibaiee/node-telegram-api/issues/4)) diff --git a/package.json b/package.json index d2a4541..ee51d69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telegram-api", - "version": "4.0.0", + "version": "3.0.0", "description": "Control Telegram bots easily using the new Telegram API", "main": "build/index.js", "scripts": { diff --git a/src/functions/api.js b/src/functions/api.js index 9ee952d..4ca5ee4 100644 --- a/src/functions/api.js +++ b/src/functions/api.js @@ -65,6 +65,11 @@ const methods = ['getMe', 'sendMessage', 'forwardMessage', 'sendPhoto', methods.forEach(method => { API.prototype[method] = function (data) { //eslint-disable-line + if (method === 'getUpdates') { + // don't add 'getUpdates' request to the queue as it's going to hinder 'send*' calls performance + return this.request(method, data); + } + // implementation taken from https://github.com/yagop/node-telegram-bot-api/issues/192#issuecomment-249488807 return new Promise((resolve, reject) => { this._queue.push({ method, data, resolve, reject });