Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added full support of Bot API 7.4 #1498

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .butcher/enums/ContentType.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ extract:
- sender_business_bot
- is_from_offline
- has_media_spoiler
- effect_id
- show_caption_above_media
1 change: 1 addition & 0 deletions .butcher/methods/copyMessage/default.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
parse_mode: parse_mode
protect_content: protect_content
show_caption_above_media: show_caption_above_media
8 changes: 8 additions & 0 deletions .butcher/methods/copyMessage/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@
"rst_description": "A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*\n",
"name": "caption_entities"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified.",
"html_description": "<td>Pass <em>True</em>, if the caption must be shown above the message media. Ignored if a new caption isn't specified.</td>",
"rst_description": "Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified.\n",
"name": "show_caption_above_media"
},
{
"type": "Boolean",
"required": false,
Expand Down
68 changes: 34 additions & 34 deletions .butcher/methods/createInvoiceLink/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,34 @@
},
{
"type": "String",
"required": true,
"description": "Payment provider token, obtained via BotFather",
"html_description": "<td>Payment provider token, obtained via <a href=\"https://t.me/botfather\">BotFather</a></td>",
"rst_description": "Payment provider token, obtained via `BotFather <https://t.me/botfather>`_\n",
"required": false,
"description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.",
"html_description": "<td>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>.</td>",
"rst_description": "Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_. Pass an empty string for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "provider_token"
},
{
"type": "String",
"required": true,
"description": "Three-letter ISO 4217 currency code, see more on currencies",
"html_description": "<td>Three-letter ISO 4217 currency code, see <a href=\"/bots/payments#supported-currencies\">more on currencies</a></td>",
"rst_description": "Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_\n",
"description": "Three-letter ISO 4217 currency code, see more on currencies. Pass 'XTR' for payments in Telegram Stars.",
"html_description": "<td>Three-letter ISO 4217 currency code, see <a href=\"/bots/payments#supported-currencies\">more on currencies</a>. Pass &#8220;XTR&#8221; for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_. Pass 'XTR' for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "currency"
},
{
"type": "Array of LabeledPrice",
"required": true,
"description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)",
"html_description": "<td>Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)</td>",
"rst_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)\n",
"description": "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 Telegram Stars.",
"html_description": "<td>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>.</td>",
"rst_description": "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 `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "prices"
},
{
"type": "Integer",
"required": false,
"description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0",
"html_description": "<td>The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <a href=\"/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</td>",
"rst_description": "The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json <https://core.telegram.org/bots/payments/currencies.json>`_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0\n",
"description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, 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 Telegram Stars.",
"html_description": "<td>The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <a href=\"/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>.</td>",
"rst_description": "The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json <https://core.telegram.org/bots/payments/currencies.json>`_, 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 `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "max_tip_amount"
},
{
Expand Down Expand Up @@ -118,57 +118,57 @@
{
"type": "Boolean",
"required": false,
"description": "Pass True if you require the user's full name to complete the order",
"html_description": "<td>Pass <em>True</em> if you require the user's full name to complete the order</td>",
"rst_description": "Pass :code:`True` if you require the user's full name to complete the order\n",
"description": "Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if you require the user's full name to complete the order. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "need_name"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if you require the user's phone number to complete the order",
"html_description": "<td>Pass <em>True</em> if you require the user's phone number to complete the order</td>",
"rst_description": "Pass :code:`True` if you require the user's phone number to complete the order\n",
"description": "Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if you require the user's phone number to complete the order. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "need_phone_number"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if you require the user's email address to complete the order",
"html_description": "<td>Pass <em>True</em> if you require the user's email address to complete the order</td>",
"rst_description": "Pass :code:`True` if you require the user's email address to complete the order\n",
"description": "Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if you require the user's email address to complete the order. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "need_email"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if you require the user's shipping address to complete the order",
"html_description": "<td>Pass <em>True</em> if you require the user's shipping address to complete the order</td>",
"rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order\n",
"description": "Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if you require the user's shipping address to complete the order. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "need_shipping_address"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the user's phone number should be sent to the provider",
"html_description": "<td>Pass <em>True</em> if the user's phone number should be sent to the provider</td>",
"rst_description": "Pass :code:`True` if the user's phone number should be sent to the provider\n",
"description": "Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if the user's phone number should be sent to the provider. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "send_phone_number_to_provider"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the user's email address should be sent to the provider",
"html_description": "<td>Pass <em>True</em> if the user's email address should be sent to the provider</td>",
"rst_description": "Pass :code:`True` if the user's email address should be sent to the provider\n",
"description": "Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if the user's email address should be sent to the provider. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "send_email_to_provider"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the final price depends on the shipping method",
"html_description": "<td>Pass <em>True</em> if the final price depends on the shipping method</td>",
"rst_description": "Pass :code:`True` if the final price depends on the shipping method\n",
"description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.",
"html_description": "<td>Pass <em>True</em> if the final price depends on the shipping method. Ignored for payments in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>.</td>",
"rst_description": "Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars <https://t.me/BotNews/90>`_.\n",
"name": "is_flexible"
}
],
Expand Down
1 change: 1 addition & 0 deletions .butcher/methods/editMessageCaption/default.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
parse_mode: parse_mode
show_caption_above_media: show_caption_above_media
8 changes: 8 additions & 0 deletions .butcher/methods/editMessageCaption/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
"rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n",
"name": "caption_entities"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.",
"html_description": "<td>Pass <em>True</em>, if the caption must be shown above the message media. Supported only for animation, photo and video messages.</td>",
"rst_description": "Pass :code:`True`, if the caption must be shown above the message media. Supported only for animation, photo and video messages.\n",
"name": "show_caption_above_media"
},
{
"type": "InlineKeyboardMarkup",
"required": false,
Expand Down
33 changes: 33 additions & 0 deletions .butcher/methods/refundStarPayment/entity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "refundstarpayment",
"name": "refundStarPayment",
"description": "Refunds a successful payment in Telegram Stars. Returns True on success.",
"html_description": "<p>Refunds a successful payment in <a href=\"https://t.me/BotNews/90\">Telegram Stars</a>. Returns <em>True</em> on success.</p>",
"rst_description": "Refunds a successful payment in `Telegram Stars <https://t.me/BotNews/90>`_. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",
"required": true,
"description": "Identifier of the user whose payment will be refunded",
"html_description": "<td>Identifier of the user whose payment will be refunded</td>",
"rst_description": "Identifier of the user whose payment will be refunded\n",
"name": "user_id"
},
{
"type": "String",
"required": true,
"description": "Telegram payment identifier",
"html_description": "<td>Telegram payment identifier</td>",
"rst_description": "Telegram payment identifier\n",
"name": "telegram_payment_charge_id"
}
],
"category": "methods"
}
}
1 change: 1 addition & 0 deletions .butcher/methods/sendAnimation/default.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
parse_mode: parse_mode
protect_content: protect_content
show_caption_above_media: show_caption_above_media
16 changes: 16 additions & 0 deletions .butcher/methods/sendAnimation/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@
"rst_description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*\n",
"name": "caption_entities"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True, if the caption must be shown above the message media",
"html_description": "<td>Pass <em>True</em>, if the caption must be shown above the message media</td>",
"rst_description": "Pass :code:`True`, if the caption must be shown above the message media\n",
"name": "show_caption_above_media"
},
{
"type": "Boolean",
"required": false,
Expand All @@ -123,6 +131,14 @@
"rst_description": "Protects the contents of the sent message from forwarding and saving\n",
"name": "protect_content"
},
{
"type": "String",
"required": false,
"description": "Unique identifier of the message effect to be added to the message; for private chats only",
"html_description": "<td>Unique identifier of the message effect to be added to the message; for private chats only</td>",
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id"
},
{
"type": "ReplyParameters",
"required": false,
Expand Down
8 changes: 8 additions & 0 deletions .butcher/methods/sendAudio/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@
"rst_description": "Protects the contents of the sent message from forwarding and saving\n",
"name": "protect_content"
},
{
"type": "String",
"required": false,
"description": "Unique identifier of the message effect to be added to the message; for private chats only",
"html_description": "<td>Unique identifier of the message effect to be added to the message; for private chats only</td>",
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id"
},
{
"type": "ReplyParameters",
"required": false,
Expand Down
8 changes: 8 additions & 0 deletions .butcher/methods/sendContact/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@
"rst_description": "Protects the contents of the sent message from forwarding and saving\n",
"name": "protect_content"
},
{
"type": "String",
"required": false,
"description": "Unique identifier of the message effect to be added to the message; for private chats only",
"html_description": "<td>Unique identifier of the message effect to be added to the message; for private chats only</td>",
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id"
},
{
"type": "ReplyParameters",
"required": false,
Expand Down
8 changes: 8 additions & 0 deletions .butcher/methods/sendDice/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
"rst_description": "Protects the contents of the sent message from forwarding\n",
"name": "protect_content"
},
{
"type": "String",
"required": false,
"description": "Unique identifier of the message effect to be added to the message; for private chats only",
"html_description": "<td>Unique identifier of the message effect to be added to the message; for private chats only</td>",
"rst_description": "Unique identifier of the message effect to be added to the message; for private chats only\n",
"name": "message_effect_id"
},
{
"type": "ReplyParameters",
"required": false,
Expand Down
Loading
Loading