Skip to content

Commit

Permalink
Added new method setChatAdministratorCustomTitle; bumped to 4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
edisonchee committed Feb 10, 2020
1 parent 2d84080 commit 4243ed8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: node_js
node_js:
- "13.8.0"
- "12.9.1"
- "10.2.0"
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@

A fuss-free, thin wrapper around Telegram Bot API for Node.js. No frills.

Updated for [Telegram Bot API 4.4](https://core.telegram.org/bots/api#july-29-2019).
Works with [Node 12.9.1](https://github.com/nodejs/node/releases/tag/v12.9.1).
Updated for [Telegram Bot API 4.5](https://core.telegram.org/bots/api#december-31-2019).
Works with [Node 13.8.0](https://github.com/nodejs/node/releases/tag/v13.8.0).
Tested on `10.16.0` and `12.10.0` as well.

_**Note:** Slimbot patch versions (e.g. x.y.**Z**) do not track or reflect Telegram Bot API changes._

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slimbot",
"version": "4.4.1",
"version": "4.5.0",
"description": "Simple and minimal Telegram Bot API for Node.js. No frills.",
"author": "Edison Chee <[email protected]>",
"repository": {
Expand All @@ -16,7 +16,7 @@
"nodejs"
],
"engines": {
"node": "^12.9.1"
"node": "^13.8.0"
},
"license": "MIT",
"scripts": {
Expand Down
10 changes: 10 additions & 0 deletions src/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,16 @@ const Telegram = EventEmitter => class extends EventEmitter {
return this._request('promoteChatMember', params, callback);
}

setChatAdministratorCustomTitle(chatId, userId, customTitle) {
let params = {
chat_id: chatId,
user_id: userId,
custom_title: customTitle
}

return this._request('setChatAdministratorCustomTitle', params, callback);
}

setChatPermissions(chatId, permissions, callback) {
let params = {
chat_id: chatId,
Expand Down

0 comments on commit 4243ed8

Please sign in to comment.