Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed getUserChatBoosts method #1201

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ TelegramBot
* [.unhideGeneralForumTopic(chatId, [options])](#TelegramBot+unhideGeneralForumTopic) ⇒ <code>Promise</code>
* [.unpinAllGeneralForumTopicMessages(chatId, [options])](#TelegramBot+unpinAllGeneralForumTopicMessages) ⇒ <code>Promise</code>
* [.answerCallbackQuery(callbackQueryId, [options])](#TelegramBot+answerCallbackQuery) ⇒ <code>Promise</code>
* [.getUserChatBoosts(chatId, user_id, [options])](#TelegramBot+getUserChatBoosts) ⇒ <code>Promise</code>
* [.getUserChatBoosts(chatId, userId, [options])](#TelegramBot+getUserChatBoosts) ⇒ <code>Promise</code>
* [.getBusinessConnection(businessConnectionId, [options])](#TelegramBot+getBusinessConnection) ⇒ <code>Promise</code>
* [.setMyCommands(commands, [options])](#TelegramBot+setMyCommands) ⇒ <code>Promise</code>
* [.deleteMyCommands([options])](#TelegramBot+deleteMyCommands) ⇒ <code>Promise</code>
Expand Down Expand Up @@ -1680,7 +1680,7 @@ that are being deprecated.

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

### telegramBot.getUserChatBoosts(chatId, user_id, [options]) ⇒ <code>Promise</code>
### telegramBot.getUserChatBoosts(chatId, userId, [options]) ⇒ <code>Promise</code>
Use this method to get the list of boosts added to a chat by a use.
Requires administrator rights in the chat

Expand All @@ -1691,7 +1691,7 @@ Requires administrator rights in the chat
| Param | Type | Description |
| --- | --- | --- |
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the group/channel |
| user_id | <code>Number</code> | Unique identifier of the target user |
| userId | <code>Number</code> | Unique identifier of the target user |
| [options] | <code>Object</code> | Additional Telegram query options |

<a name="TelegramBot+getBusinessConnection"></a>
Expand Down
6 changes: 3 additions & 3 deletions src/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}

Expand Down