Skip to content

Commit f17e801

Browse files
docs: revokeChatInviteLink
1 parent 595cdbd commit f17e801

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/api.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ TelegramBot
7070
* [.exportChatInviteLink(chatId, [options])](#TelegramBot+exportChatInviteLink) ⇒ <code>Promise</code>
7171
* [.createChatInviteLink(chatId, [options])](#TelegramBot+createChatInviteLink) ⇒ <code>Object</code>
7272
* [.editChatInviteLink(chatId, inviteLink, [options])](#TelegramBot+editChatInviteLink) ⇒ <code>Promise</code>
73-
* [.revokeChatInviteLink(chatId, [options])](#TelegramBot+revokeChatInviteLink) ⇒ <code>Promise</code>
73+
* [.revokeChatInviteLink(chatId, inviteLink, [options])](#TelegramBot+revokeChatInviteLink) ⇒ <code>Promise</code>
7474
* [.approveChatJoinRequest(chatId, userId, [options])](#TelegramBot+approveChatJoinRequest) ⇒ <code>Promise</code>
7575
* [.declineChatJoinRequest(chatId, userId, [options])](#TelegramBot+declineChatJoinRequest) ⇒ <code>Promise</code>
7676
* [.setChatPhoto(chatId, photo, [options], [fileOptions])](#TelegramBot+setChatPhoto) ⇒ <code>Promise</code>
@@ -1113,7 +1113,7 @@ The bot **must be an administrator in the chat** for this to work and must have
11131113

11141114
<a name="TelegramBot+revokeChatInviteLink"></a>
11151115

1116-
### telegramBot.revokeChatInviteLink(chatId, [options]) ⇒ <code>Promise</code>
1116+
### telegramBot.revokeChatInviteLink(chatId, inviteLink, [options]) ⇒ <code>Promise</code>
11171117
Use this method to revoke an invite link created by the bot.
11181118
Note: If the primary link is revoked, a new link is automatically generated
11191119

@@ -1126,6 +1126,7 @@ The bot **must be an administrator in the chat** for this to work and must have
11261126
| Param | Type | Description |
11271127
| --- | --- | --- |
11281128
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) |
1129+
| inviteLink | <code>String</code> | The invite link to revoke |
11291130
| [options] | <code>Object</code> | Additional Telegram query options |
11301131

11311132
<a name="TelegramBot+approveChatJoinRequest"></a>

src/telegram.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,7 @@ class TelegramBot extends EventEmitter {
16091609
* The bot **must be an administrator in the chat** for this to work and must have the appropriate admin rights.
16101610
*
16111611
* @param {Number|String} chatId Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
1612+
* @param {String} inviteLink The invite link to revoke
16121613
* @param {Object} [options] Additional Telegram query options
16131614
* @return {Promise} The revoked invite link as [ChatInviteLink](https://core.telegram.org/bots/api#chatinvitelink) object
16141615
* @see https://core.telegram.org/bots/api#revokechatinvitelink

0 commit comments

Comments
 (0)