2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-31 14:25:57 +00:00

docs: revokeChatInviteLink

This commit is contained in:
Daniel
2023-10-24 11:25:43 +02:00
parent 595cdbd0c6
commit f17e801b8a
2 changed files with 4 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ TelegramBot
* [.exportChatInviteLink(chatId, [options])](#TelegramBot+exportChatInviteLink) ⇒ <code>Promise</code> * [.exportChatInviteLink(chatId, [options])](#TelegramBot+exportChatInviteLink) ⇒ <code>Promise</code>
* [.createChatInviteLink(chatId, [options])](#TelegramBot+createChatInviteLink) ⇒ <code>Object</code> * [.createChatInviteLink(chatId, [options])](#TelegramBot+createChatInviteLink) ⇒ <code>Object</code>
* [.editChatInviteLink(chatId, inviteLink, [options])](#TelegramBot+editChatInviteLink) ⇒ <code>Promise</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> * [.approveChatJoinRequest(chatId, userId, [options])](#TelegramBot+approveChatJoinRequest) ⇒ <code>Promise</code>
* [.declineChatJoinRequest(chatId, userId, [options])](#TelegramBot+declineChatJoinRequest) ⇒ <code>Promise</code> * [.declineChatJoinRequest(chatId, userId, [options])](#TelegramBot+declineChatJoinRequest) ⇒ <code>Promise</code>
* [.setChatPhoto(chatId, photo, [options], [fileOptions])](#TelegramBot+setChatPhoto) ⇒ <code>Promise</code> * [.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
<a name="TelegramBot+revokeChatInviteLink"></a> <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. 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 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 | | 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`) | | 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 | | [options] | <code>Object</code> | Additional Telegram query options |
<a name="TelegramBot+approveChatJoinRequest"></a> <a name="TelegramBot+approveChatJoinRequest"></a>

View File

@@ -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. * 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 {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 * @param {Object} [options] Additional Telegram query options
* @return {Promise} The revoked invite link as [ChatInviteLink](https://core.telegram.org/bots/api#chatinvitelink) object * @return {Promise} The revoked invite link as [ChatInviteLink](https://core.telegram.org/bots/api#chatinvitelink) object
* @see https://core.telegram.org/bots/api#revokechatinvitelink * @see https://core.telegram.org/bots/api#revokechatinvitelink