You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method <a href="https://core.telegram.org/bots/webapps#initializing-mini-apps">requestEmojiStatusAccess</a>. Returns <em>True</em> on success.
946
+
*
947
+
* @param int $user_id Unique identifier of the target user
948
+
* @param string $emoji_status_custom_emoji_id Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.
949
+
* @param int $emoji_status_expiration_date Expiration date of the emoji status, if any
* Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a <a href="https://core.telegram.org/bots/api#file">File</a> object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling <a href="https://core.telegram.org/bots/api#getfile">getFile</a> again.
945
963
*
@@ -2263,6 +2281,27 @@ public function deleteStickerSet(string $name): bool
* Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns <em>True</em> on success.
2286
+
*
2287
+
* @param int $user_id Unique identifier of the target user that will receive the gift
2288
+
* @param string $gift_id Identifier of the gift
2289
+
* @param string $text Text that will be shown along with the gift; 0-255 characters
2290
+
* @param string $text_parse_mode Mode for parsing entities in the text. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
2291
+
* @param MessageEntity[] $text_entities A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of <em>text_parse_mode</em>. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
2292
+
*
2293
+
* @throws TelegramException
2294
+
*/
2295
+
publicfunctionsendGift(
2296
+
int$user_id,
2297
+
string$gift_id,
2298
+
?string$text = null,
2299
+
?string$text_parse_mode = null,
2300
+
?array$text_entities = null,
2301
+
): bool {
2302
+
return$this->raw('sendGift', func_get_args());
2303
+
}
2304
+
2266
2305
/**
2267
2306
* Use this method to send answers to an inline query. On success, <em>True</em> is returned.No more than 50 results per query are allowed.
2268
2307
*
@@ -2299,6 +2338,29 @@ public function answerWebAppQuery(string $web_app_query_id, InlineQueryResult $r
* Stores a message that can be sent by a user of a Mini App. Returns a <a href="https://core.telegram.org/bots/api#preparedinlinemessage">PreparedInlineMessage</a> object.
2343
+
*
2344
+
* @param int $user_id Unique identifier of the target user that can use the prepared message
2345
+
* @param InlineQueryResult $result A JSON-serialized object describing the message to be sent
2346
+
* @param bool $allow_user_chats Pass <em>True</em> if the message can be sent to private chats with users
2347
+
* @param bool $allow_bot_chats Pass <em>True</em> if the message can be sent to private chats with bots
2348
+
* @param bool $allow_group_chats Pass <em>True</em> if the message can be sent to group and supergroup chats
2349
+
* @param bool $allow_channel_chats Pass <em>True</em> if the message can be sent to channel chats
* Use this method to send invoices. On success, the sent <a href="https://core.telegram.org/bots/api#message">Message</a> is returned.
2304
2366
*
@@ -2376,7 +2438,9 @@ public function sendInvoice(
2376
2438
* @param string $payload Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
2377
2439
* @param string $currency Three-letter ISO 4217 currency code, see <a href="https://core.telegram.org/bots/payments#supported-currencies">more on currencies</a>. Pass “XTR” for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.
2378
2440
* @param LabeledPrice[] $prices Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.
2441
+
* @param string $business_connection_id Unique identifier of the business connection on behalf of which the link will be created. For payments in <a href="https://t.me/BotNews/90">Telegram Stars</a> only.
2379
2442
* @param string $provider_token Payment provider token, obtained via <a href="https://t.me/botfather">@BotFather</a>. Pass an empty string for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.
2443
+
* @param int $subscription_period The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user.
2380
2444
* @param int $max_tip_amount The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the <em>exp</em> parameter in <a href="https://core.telegram.org/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.
2381
2445
* @param int[] $suggested_tip_amounts A JSON-serialized array of suggested amounts of tips in the <em>smallest units</em> of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed <em>max_tip_amount</em>.
2382
2446
* @param string $provider_data JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
@@ -2400,7 +2464,9 @@ public function createInvoiceLink(
2400
2464
string$payload,
2401
2465
string$currency,
2402
2466
array$prices,
2467
+
?string$business_connection_id = null,
2403
2468
?string$provider_token = null,
2469
+
?int$subscription_period = null,
2404
2470
?int$max_tip_amount = null,
2405
2471
?array$suggested_tip_amounts = null,
2406
2472
?string$provider_data = null,
@@ -2481,6 +2547,23 @@ public function refundStarPayment(int $user_id, string $telegram_payment_charge_
* Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns <em>True</em> on success.
2552
+
*
2553
+
* @param int $user_id Identifier of the user whose subscription will be edited
2554
+
* @param string $telegram_payment_charge_id Telegram payment identifier for the subscription
2555
+
* @param bool $is_canceled Pass <em>True</em> to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass <em>False</em> to allow the user to re-enable a subscription that was previously canceled by the bot.
* Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns <em>True</em> on success.
0 commit comments