diff --git a/CHANGELOG.md b/CHANGELOG.md index 5742d45..267767f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). * copyMessages (@xjx0106 & @Sp3ricka) * setMessageReaction (@Sp3ricka) * forwardMessages (@danielperez9430) + * getUserChatBoosts (@danielperez9430) 2. Minor changes: (@danielperez9430) * Refactor methods order diff --git a/src/telegram.js b/src/telegram.js index a259e00..cc6e223 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -2208,6 +2208,22 @@ class TelegramBot extends EventEmitter { return this._request('answerCallbackQuery', { form }); } + /** + * Use this method to get the list of boosts added to a chat by a use. + * 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 {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 = {}) { + form.chat_id = chatId; + form.message_id = pollId; + return this._request('stopPoll', { form }); + } + /** * Use this method to change the list of the bot's commands. *