From f17e801b8a0a194ced929abdcb23e245b953f687 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 24 Oct 2023 11:25:43 +0200 Subject: [PATCH] docs: revokeChatInviteLink --- doc/api.md | 5 +++-- src/telegram.js | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api.md b/doc/api.md index 81812fdb..1b39ab91 100644 --- a/doc/api.md +++ b/doc/api.md @@ -70,7 +70,7 @@ TelegramBot * [.exportChatInviteLink(chatId, [options])](#TelegramBot+exportChatInviteLink) ⇒ Promise * [.createChatInviteLink(chatId, [options])](#TelegramBot+createChatInviteLink) ⇒ Object * [.editChatInviteLink(chatId, inviteLink, [options])](#TelegramBot+editChatInviteLink) ⇒ Promise - * [.revokeChatInviteLink(chatId, [options])](#TelegramBot+revokeChatInviteLink) ⇒ Promise + * [.revokeChatInviteLink(chatId, inviteLink, [options])](#TelegramBot+revokeChatInviteLink) ⇒ Promise * [.approveChatJoinRequest(chatId, userId, [options])](#TelegramBot+approveChatJoinRequest) ⇒ Promise * [.declineChatJoinRequest(chatId, userId, [options])](#TelegramBot+declineChatJoinRequest) ⇒ Promise * [.setChatPhoto(chatId, photo, [options], [fileOptions])](#TelegramBot+setChatPhoto) ⇒ Promise @@ -1113,7 +1113,7 @@ The bot **must be an administrator in the chat** for this to work and must have -### telegramBot.revokeChatInviteLink(chatId, [options]) ⇒ Promise +### telegramBot.revokeChatInviteLink(chatId, inviteLink, [options]) ⇒ Promise 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 @@ -1126,6 +1126,7 @@ The bot **must be an administrator in the chat** for this to work and must have | Param | Type | Description | | --- | --- | --- | | chatId | Number \| String | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) | +| inviteLink | String | The invite link to revoke | | [options] | Object | Additional Telegram query options | diff --git a/src/telegram.js b/src/telegram.js index 9e26f44c..9e1c701e 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -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