2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-09-01 06:45:41 +00:00

feat: Support Telegram Bot API 7.4

This commit is contained in:
danielperez9430
2024-05-30 23:33:27 +02:00
parent e7dd42c227
commit f40b421717
5 changed files with 38 additions and 3 deletions

View File

@@ -146,6 +146,7 @@ TelegramBot
* [.createInvoiceLink(title, description, payload, providerToken, currency, prices, [options])](#TelegramBot+createInvoiceLink) ⇒ <code>Promise</code>
* [.answerShippingQuery(shippingQueryId, ok, [options])](#TelegramBot+answerShippingQuery) ⇒ <code>Promise</code>
* [.answerPreCheckoutQuery(preCheckoutQueryId, ok, [options])](#TelegramBot+answerPreCheckoutQuery) ⇒ <code>Promise</code>
* [.refundStarPayment(userId, telegramPaymentChargeId, [options])](#TelegramBot+refundStarPayment) ⇒ <code>Promise</code>
* [.sendGame(chatId, gameShortName, [options])](#TelegramBot+sendGame) ⇒ <code>Promise</code>
* [.setGameScore(userId, score, [options])](#TelegramBot+setGameScore) ⇒ <code>Promise</code>
* [.getGameHighScores(userId, [options])](#TelegramBot+getGameHighScores) ⇒ <code>Promise</code>
@@ -2364,6 +2365,21 @@ an [Update](https://core.telegram.org/bots/api#update) with the field *pre_check
| ok | <code>Boolean</code> | Specify if every order details are ok |
| [options] | <code>Object</code> | Additional Telegram query options |
<a name="TelegramBot+refundStarPayment"></a>
### telegramBot.refundStarPayment(userId, telegramPaymentChargeId, [options]) ⇒ <code>Promise</code>
Use this method for refund a successful payment in [Telegram Stars](https://t.me/BotNews/90)
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
**Returns**: <code>Promise</code> - On success, True is returned
**See**: https://core.telegram.org/bots/api#refundstarpayment
| Param | Type | Description |
| --- | --- | --- |
| userId | <code>Number</code> | Unique identifier of the user whose payment will be refunded |
| telegramPaymentChargeId | <code>String</code> | Telegram payment identifier |
| [options] | <code>Object</code> | Additional Telegram query options |
<a name="TelegramBot+sendGame"></a>
### telegramBot.sendGame(chatId, gameShortName, [options]) ⇒ <code>Promise</code>