Skip to content

Commit

Permalink
docs: revokeChatInviteLink
Browse files Browse the repository at this point in the history
  • Loading branch information
danielperez9430 committed Oct 24, 2023
1 parent 595cdbd commit f17e801
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ TelegramBot
* [.exportChatInviteLink(chatId, [options])](#TelegramBot+exportChatInviteLink) ⇒ <code>Promise</code>
* [.createChatInviteLink(chatId, [options])](#TelegramBot+createChatInviteLink) ⇒ <code>Object</code>
* [.editChatInviteLink(chatId, inviteLink, [options])](#TelegramBot+editChatInviteLink) ⇒ <code>Promise</code>
* [.revokeChatInviteLink(chatId, [options])](#TelegramBot+revokeChatInviteLink) ⇒ <code>Promise</code>
* [.revokeChatInviteLink(chatId, inviteLink, [options])](#TelegramBot+revokeChatInviteLink) ⇒ <code>Promise</code>
* [.approveChatJoinRequest(chatId, userId, [options])](#TelegramBot+approveChatJoinRequest) ⇒ <code>Promise</code>
* [.declineChatJoinRequest(chatId, userId, [options])](#TelegramBot+declineChatJoinRequest) ⇒ <code>Promise</code>
* [.setChatPhoto(chatId, photo, [options], [fileOptions])](#TelegramBot+setChatPhoto) ⇒ <code>Promise</code>
Expand Down Expand Up @@ -1113,7 +1113,7 @@ The bot **must be an administrator in the chat** for this to work and must have

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

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

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

<a name="TelegramBot+approveChatJoinRequest"></a>
Expand Down
1 change: 1 addition & 0 deletions src/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -1609,6 +1609,7 @@ class TelegramBot extends EventEmitter {
* The bot **must be an administrator in the chat** for this to work and must have the appropriate admin rights.
*
* @param {Number|String} chatId Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
* @param {String} inviteLink The invite link to revoke
* @param {Object} [options] Additional Telegram query options
* @return {Promise} The revoked invite link as [ChatInviteLink](https://core.telegram.org/bots/api#chatinvitelink) object
* @see https://core.telegram.org/bots/api#revokechatinvitelink
Expand Down

0 comments on commit f17e801

Please sign in to comment.