Skip to content

Commit bbbc6cb

Browse files
feat: Support Telegram Bot API 5.5
1 parent 5ff2214 commit bbbc6cb

File tree

4 files changed

+49
-2
lines changed

4 files changed

+49
-2
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## [0.56.0][0.56.0] - 2021-12-07
7+
8+
Added:
9+
10+
1. Support Bot API v5.5: (@danielperez9430)
11+
12+
* Add method *banChatSenderChat()*
13+
* Add method *unbanChatSenderChat()*
14+
15+
Fixes:
16+
17+
* Tests for support with new invite link format
18+
619
## [0.55.0][0.55.0] - 2021-11-06
720

821
Added:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Node.js module to interact with the official [Telegram Bot API](https://core.telegram.org/bots/api).
66

77

8-
[![Bot API](https://img.shields.io/badge/Bot%20API-v.5.4-00aced.svg?style=flat-square&logo=telegram)](https://core.telegram.org/bots/api)
8+
[![Bot API](https://img.shields.io/badge/Bot%20API-v.5.5-00aced.svg?style=flat-square&logo=telegram)](https://core.telegram.org/bots/api)
99
[![npm package](https://img.shields.io/npm/v/node-telegram-bot-api?logo=npm&style=flat-square)](https://www.npmjs.org/package/node-telegram-bot-api)
1010
[![Build Status](https://img.shields.io/travis/yagop/node-telegram-bot-api/master?style=flat-square&logo=travis)](https://travis-ci.org/yagop/node-telegram-bot-api)
1111
[![Coverage Status](https://img.shields.io/codecov/c/github/yagop/node-telegram-bot-api?style=flat-square&logo=codecov)](https://codecov.io/gh/yagop/node-telegram-bot-api)

doc/api.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ TelegramBot
4949
* [.restrictChatMember(chatId, userId, [options])](#TelegramBot+restrictChatMember) ⇒ <code>Promise</code>
5050
* [.promoteChatMember(chatId, userId, [options])](#TelegramBot+promoteChatMember) ⇒ <code>Promise</code>
5151
* [.setChatAdministratorCustomTitle(chatId, userId, customTitle, [options])](#TelegramBot+setChatAdministratorCustomTitle) ⇒ <code>Promise</code>
52+
* [.banChatSenderChat(chatId, senderChatId, [options])](#TelegramBot+banChatSenderChat) ⇒ <code>Boolean</code>
53+
* [.unbanChatSenderChat(chatId, senderChatId, [options])](#TelegramBot+unbanChatSenderChat) ⇒ <code>Boolean</code>
5254
* [.setChatPermissions(chatId, chatPermissions, [options])](#TelegramBot+setChatPermissions) ⇒ <code>Promise</code>
5355
* [.exportChatInviteLink(chatId, [options])](#TelegramBot+exportChatInviteLink) ⇒ <code>Promise</code>
5456
* [.createChatInviteLink(chatId, [options])](#TelegramBot+createChatInviteLink) ⇒ <code>Object</code>
@@ -703,6 +705,38 @@ Returns True on success.
703705
| customTitle | <code>String</code> | New custom title for the administrator; 0-16 characters, emoji are not allowed |
704706
| [options] | <code>Object</code> | Additional Telegram query options |
705707

708+
<a name="TelegramBot+banChatSenderChat"></a>
709+
710+
### telegramBot.banChatSenderChat(chatId, senderChatId, [options]) ⇒ <code>Promise</code>
711+
Use this method to ban a channel chat in a supergroup or a channel.
712+
The owner of the chat will not be able to send messages and join live streams on behalf of the chat, unless it is unbanned first.
713+
Returns True on success.
714+
715+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
716+
**See**: https://core.telegram.org/bots/api#banchatsenderchat
717+
718+
| Param | Type | Description |
719+
| --- | --- | --- |
720+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel |
721+
| senderChatId | <code>Number</code> | Unique identifier of the target sender chat |
722+
| [options] | <code>Object</code> | Additional Telegram query options |
723+
724+
<a name="TelegramBot+unbanChatSenderChat"></a>
725+
726+
### telegramBot.unbanChatSenderChat(chatId, senderChatId, [options]) ⇒ <code>Promise</code>
727+
Use this method to unban a previously banned channel chat in a supergroup or channel.
728+
The bot must be an administrator for this to work and must have the appropriate administrator rights.
729+
Returns True on success.
730+
731+
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
732+
**See**: https://core.telegram.org/bots/api#unbanchatsenderchat
733+
734+
| Param | Type | Description |
735+
| --- | --- | --- |
736+
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel |
737+
| senderChatId | <code>Number</code> | Unique identifier of the target sender chat |
738+
| [options] | <code>Object</code> | Additional Telegram query options |
739+
706740
<a name="TelegramBot+setChatPermissions"></a>
707741

708742
### telegramBot.setChatPermissions(chatId, chatPermissions, [options]) ⇒ <code>Promise</code>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-telegram-bot-api",
3-
"version": "0.55.0",
3+
"version": "0.56.0",
44
"description": "Telegram Bot API",
55
"main": "./index.js",
66
"directories": {

0 commit comments

Comments
 (0)