From 3b0396ce594a5543b4f881e3fd39b90107f6fa5d Mon Sep 17 00:00:00 2001 From: dsvynarenko Date: Thu, 30 May 2024 18:43:39 +0200 Subject: [PATCH] Fixed #1200 --- doc/api.md | 6 +++--- src/telegram.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/api.md b/doc/api.md index 2207b00b..745895a7 100644 --- a/doc/api.md +++ b/doc/api.md @@ -104,7 +104,7 @@ TelegramBot * [.unhideGeneralForumTopic(chatId, [options])](#TelegramBot+unhideGeneralForumTopic) ⇒ Promise * [.unpinAllGeneralForumTopicMessages(chatId, [options])](#TelegramBot+unpinAllGeneralForumTopicMessages) ⇒ Promise * [.answerCallbackQuery(callbackQueryId, [options])](#TelegramBot+answerCallbackQuery) ⇒ Promise - * [.getUserChatBoosts(chatId, user_id, [options])](#TelegramBot+getUserChatBoosts) ⇒ Promise + * [.getUserChatBoosts(chatId, userId, [options])](#TelegramBot+getUserChatBoosts) ⇒ Promise * [.getBusinessConnection(businessConnectionId, [options])](#TelegramBot+getBusinessConnection) ⇒ Promise * [.setMyCommands(commands, [options])](#TelegramBot+setMyCommands) ⇒ Promise * [.deleteMyCommands([options])](#TelegramBot+deleteMyCommands) ⇒ Promise @@ -1680,7 +1680,7 @@ that are being deprecated. -### telegramBot.getUserChatBoosts(chatId, user_id, [options]) ⇒ Promise +### telegramBot.getUserChatBoosts(chatId, userId, [options]) ⇒ Promise Use this method to get the list of boosts added to a chat by a use. Requires administrator rights in the chat @@ -1691,7 +1691,7 @@ Requires administrator rights in the chat | Param | Type | Description | | --- | --- | --- | | chatId | Number \| String | Unique identifier for the group/channel | -| user_id | Number | Unique identifier of the target user | +| userId | Number | Unique identifier of the target user | | [options] | Object | Additional Telegram query options | diff --git a/src/telegram.js b/src/telegram.js index e8f86857..5cb196d5 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -2248,14 +2248,14 @@ class TelegramBot extends EventEmitter { * Requires administrator rights in the chat * * @param {Number|String} chatId Unique identifier for the group/channel - * @param {Number} user_id Unique identifier of the target user + * @param {Number} userId Unique identifier of the target user * @param {Object} [options] Additional Telegram query options * @return {Promise} On success, returns a [UserChatBoosts](https://core.telegram.org/bots/api#userchatboosts) object * @see https://core.telegram.org/bots/api#getuserchatboosts */ - getUserChatBoosts(chatId, pollId, form = {}) { + getUserChatBoosts(chatId, userId, form = {}) { form.chat_id = chatId; - form.message_id = pollId; + form.user_id = userId; return this._request('getUserChatBoosts', { form }); }