Skip to content

Commit

Permalink
Added full support of Bot API 7.5 (#1518)
Browse files Browse the repository at this point in the history
* Added full support of Bot API 7.5

* Added changelog

* Update date type in RevenueWithdrawalStateSucceeded

* Added example
  • Loading branch information
JrooTJunior committed Jun 18, 2024
1 parent dcfc963 commit 1f7bbeb
Show file tree
Hide file tree
Showing 72 changed files with 1,629 additions and 51 deletions.
12 changes: 12 additions & 0 deletions .butcher/enums/RevenueWithdrawalStateType.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: RevenueWithdrawalStateType
description: |
This object represents a revenue withdrawal state type
Source: https://core.telegram.org/bots/api#revenuewithdrawalstate
multi_parse:
attribute: type
regexp: "'([a-z_]+)'"
entities:
- RevenueWithdrawalStateFailed
- RevenueWithdrawalStatePending
- RevenueWithdrawalStateSucceeded
12 changes: 12 additions & 0 deletions .butcher/enums/TransactionPartnerType.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: TransactionPartnerType
description: |
This object represents a type of transaction partner.
Source: https://core.telegram.org/bots/api#transactionpartner
multi_parse:
attribute: type
regexp: "'([a-z_]+)'"
entities:
- TransactionPartnerFragment
- TransactionPartnerOther
- TransactionPartnerUser
14 changes: 11 additions & 3 deletions .butcher/methods/editMessageCaption/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@
"object": {
"anchor": "editmessagecaption",
"name": "editMessageCaption",
"description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.",
"html_description": "<p>Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned.</p>",
"rst_description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.",
"description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.",
"html_description": "<p>Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>",
"rst_description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
Expand Down
8 changes: 8 additions & 0 deletions .butcher/methods/editMessageLiveLocation/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
"html_description": "<p>Use this method to edit live location messages. A location can be edited until its <em>live_period</em> expires or editing is explicitly disabled by a call to <a href=\"#stopmessagelivelocation\">stopMessageLiveLocation</a>. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned.</p>",
"rst_description": "Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
Expand Down
14 changes: 11 additions & 3 deletions .butcher/methods/editMessageMedia/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@
"object": {
"anchor": "editmessagemedia",
"name": "editMessageMedia",
"description": "Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.",
"html_description": "<p>Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned.</p>",
"rst_description": "Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.",
"description": "Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.",
"html_description": "<p>Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>",
"rst_description": "Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
Expand Down
14 changes: 11 additions & 3 deletions .butcher/methods/editMessageReplyMarkup/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@
"object": {
"anchor": "editmessagereplymarkup",
"name": "editMessageReplyMarkup",
"description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.",
"html_description": "<p>Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned.</p>",
"rst_description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.",
"description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.",
"html_description": "<p>Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>",
"rst_description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
Expand Down
14 changes: 11 additions & 3 deletions .butcher/methods/editMessageText/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@
"object": {
"anchor": "editmessagetext",
"name": "editMessageText",
"description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.",
"html_description": "<p>Use this method to edit text and <a href=\"#games\">game</a> messages. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned.</p>",
"rst_description": "Use this method to edit text and `game <https://core.telegram.org/bots/api#games>`_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.",
"description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.",
"html_description": "<p>Use this method to edit text and <a href=\"#games\">game</a> messages. On success, if the edited message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>",
"rst_description": "Use this method to edit text and `game <https://core.telegram.org/bots/api#games>`_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
Expand Down
33 changes: 33 additions & 0 deletions .butcher/methods/getStarTransactions/entity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "getstartransactions",
"name": "getStarTransactions",
"description": "Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object.",
"html_description": "<p>Returns the bot's Telegram Star transactions in chronological order. On success, returns a <a href=\"#startransactions\">StarTransactions</a> object.</p>",
"rst_description": "Returns the bot's Telegram Star transactions in chronological order. On success, returns a :class:`aiogram.types.star_transactions.StarTransactions` object.",
"annotations": [
{
"type": "Integer",
"required": false,
"description": "Number of transactions to skip in the response",
"html_description": "<td>Number of transactions to skip in the response</td>",
"rst_description": "Number of transactions to skip in the response\n",
"name": "offset"
},
{
"type": "Integer",
"required": false,
"description": "The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.",
"html_description": "<td>The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.</td>",
"rst_description": "The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.\n",
"name": "limit"
}
],
"category": "methods"
}
}
8 changes: 8 additions & 0 deletions .butcher/methods/stopMessageLiveLocation/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
"html_description": "<p>Use this method to stop updating a live location message before <em>live_period</em> expires. On success, if the message is not an inline message, the edited <a href=\"#message\">Message</a> is returned, otherwise <em>True</em> is returned.</p>",
"rst_description": "Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": false,
Expand Down
8 changes: 8 additions & 0 deletions .butcher/methods/stopPoll/entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
"html_description": "<p>Use this method to stop a poll which was sent by the bot. On success, the stopped <a href=\"#poll\">Poll</a> is returned.</p>",
"rst_description": "Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message to be edited was sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message to be edited was sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
Expand Down
Loading

0 comments on commit 1f7bbeb

Please sign in to comment.