slimbot
Advanced tools
Comparing version 5.0.0 to 5.1.0
{ | ||
"name": "slimbot", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"description": "Simple and minimal Telegram Bot API for Node.js. No frills.", | ||
@@ -35,6 +35,6 @@ "author": "Edison Chee <edisonchee@live.com>", | ||
"coveralls": "^3.1.0", | ||
"eslint": "^7.15.0", | ||
"handlebars": ">=4.7.6", | ||
"eslint": "^7.22.0", | ||
"handlebars": ">=4.7.7", | ||
"istanbul": "^0.4.5", | ||
"jasmine": "^3.6.3", | ||
"jasmine": "^3.7.0", | ||
"mockery": "^2.1.0" | ||
@@ -41,0 +41,0 @@ }, |
@@ -1,4 +0,3 @@ | ||
[![Build Status](https://travis-ci.org/edisonchee/slimbot.svg?branch=master)](https://travis-ci.org/edisonchee/slimbot) | ||
[![Build Status](https://travis-ci.com/edisonchee/slimbot.svg?branch=master)](https://travis-ci.com/edisonchee/slimbot) | ||
[![Coverage Status](https://coveralls.io/repos/github/edisonchee/slimbot/badge.svg?branch=master)](https://coveralls.io/github/edisonchee/slimbot?branch=master) | ||
[![Dependency Status](https://david-dm.org/edisonchee/slimbot.svg)](https://david-dm.org/edisonchee/slimbot) | ||
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/edisonchee/slimbot/master/LICENSE) | ||
@@ -10,5 +9,5 @@ | ||
Updated for [Telegram Bot API 5.0](https://core.telegram.org/bots/api#november-4-2020). | ||
Works with [Node 15.4.0](https://github.com/nodejs/node/releases/tag/v15.4.0). | ||
Runs on latest Node version `15.4.0`. Tested on `10.16.0` and `12.10.0` as well. | ||
Updated for [Telegram Bot API 5.1](https://core.telegram.org/bots/api#march-9-2021). | ||
Works with [Node 15.12.0](https://github.com/nodejs/node/releases/tag/v15.12.0). | ||
Runs on latest Node version `15.12.0`. Tested on `10.16.0` and `12.10.0` as well. | ||
@@ -15,0 +14,0 @@ _**Note:** Slimbot patch versions (e.g. x.y.**Z**) do not track or reflect Telegram Bot API changes._ |
@@ -27,2 +27,4 @@ 'use strict'; | ||
let pollAnswerQuery = update.poll_answer; | ||
let myChatMember = update.my_chat_member; | ||
let chatMember = update.chat_member; | ||
@@ -51,2 +53,6 @@ if (message) { | ||
this.emit('poll_answer', pollAnswerQuery) | ||
} else if (myChatMember) { | ||
this.emit('my_chat_member', myChatMember) | ||
} else if (chatMember) { | ||
this.emit('chat_member', chatMember) | ||
} | ||
@@ -53,0 +59,0 @@ }); |
@@ -1025,2 +1025,40 @@ 'use strict'; | ||
createChatInviteLink(chatId, optionalParams, callback) { | ||
let params = { | ||
chat_id: chatId | ||
} | ||
if (typeof optionalParams == 'function') { | ||
callback = optionalParams; | ||
} else { | ||
Object.assign(params, optionalParams); | ||
} | ||
return this._request('createChatInviteLink', params, callback); | ||
} | ||
editChatInviteLink(chatId, inviteLink, optionalParams, callback) { | ||
let params = { | ||
chat_id: chatId, | ||
invite_link: inviteLink | ||
} | ||
if (typeof optionalParams == 'function') { | ||
callback = optionalParams; | ||
} else { | ||
Object.assign(params, optionalParams); | ||
} | ||
return this._request('editChatInviteLink', params, callback); | ||
} | ||
revokeChatInviteLink(chatId, inviteLink, callback) { | ||
let params = { | ||
chat_id: chatId, | ||
invite_link: inviteLink | ||
} | ||
return this._request('revokeChatInviteLink', params, callback); | ||
} | ||
setChatPhoto(chatId, photo, callback) { | ||
@@ -1027,0 +1065,0 @@ let params = { |
Sorry, the diff of this file is not supported yet
275406
1547
101