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:
parent
01c3ea77c9
commit
8cff652e05
5126
doc/api.md
5126
doc/api.md
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user