Skip to content

Commit d323a3b

Browse files
feat: support getUserChatBoosts
1 parent 515a1ac commit d323a3b

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1010
* copyMessages (@xjx0106 & @Sp3ricka)
1111
* setMessageReaction (@Sp3ricka)
1212
* forwardMessages (@danielperez9430)
13+
* getUserChatBoosts (@danielperez9430)
1314

1415
2. Minor changes: (@danielperez9430)
1516
* Refactor methods order

src/telegram.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2208,6 +2208,22 @@ class TelegramBot extends EventEmitter {
22082208
return this._request('answerCallbackQuery', { form });
22092209
}
22102210

2211+
/**
2212+
* Use this method to get the list of boosts added to a chat by a use.
2213+
* Requires administrator rights in the chat
2214+
*
2215+
* @param {Number|String} chatId Unique identifier for the group/channel
2216+
* @param {Number} user_id Unique identifier of the target user
2217+
* @param {Object} [options] Additional Telegram query options
2218+
* @return {Promise} On success, returns a [UserChatBoosts](https://core.telegram.org/bots/api#userchatboosts) object
2219+
* @see https://core.telegram.org/bots/api#getuserchatboosts
2220+
*/
2221+
getUserChatBoosts(chatId, pollId, form = {}) {
2222+
form.chat_id = chatId;
2223+
form.message_id = pollId;
2224+
return this._request('stopPoll', { form });
2225+
}
2226+
22112227
/**
22122228
* Use this method to change the list of the bot's commands.
22132229
*

0 commit comments

Comments
 (0)