2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-22 01:47:25 +00:00

feat: save prepared inline message v8.0 (#1248)

* Add support for savePreparedInlineMessage in bot api v8.0 #1243

* run `npm run doc` command

---------

Co-authored-by: Daniel Pérez Fernández <dpefe@hotmail.es>
This commit is contained in:
Ismail Bin Mujeeb 2025-04-16 14:24:56 +05:30 committed by GitHub
parent 01c3ea77c9
commit 8cff652e05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2587 additions and 2554 deletions

5126
doc/api.md

File diff suppressed because it is too large Load Diff

View File

@ -2398,6 +2398,21 @@ class TelegramBot extends EventEmitter {
return this._request('answerCallbackQuery', { form });
}
/**
* Use this method to get the unique identifier of the prepared message and expiration date of the prepared message as an object.
*
* @param {Number} userId Unique identifier of the target user
* @param {Object} result The prepared inline message result to be saved
* @param {Object} [form={}] Optional form data to include in the request
* @return {Promise} On success, returns a PreparedInlineMessage object
* @see https://core.telegram.org/bots/api#savepreparedinlinemessage
*/
savePreparedInlineMessage(userId, result, form = {}) {
form.user_id = userId;
form.result = stringify(result);
return this._request('savePreparedInlineMessage', { form });
}
/**
* Use this method to get the list of boosts added to a chat by a use.
* Requires administrator rights in the chat