2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-22 09:57:10 +00:00

feat: support getUserChatBoosts

This commit is contained in:
danielperez9430 2024-02-21 01:20:45 +01:00
parent 515a1acdc7
commit d323a3bac5
2 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -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.
*