mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added full support for the Bot API 8.3 (#1638)
* Added full support for the Bot API 8.3 * Added changelog * Ignore typing for aiohttp_socks
This commit is contained in:
parent
25833b830e
commit
d8b9ce1be9
65 changed files with 660 additions and 118 deletions
|
|
@ -259,6 +259,14 @@
|
|||
"name": "permissions",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "True",
|
||||
"description": "True, if gifts can be sent to the chat",
|
||||
"html_description": "<td><em>Optional</em>. <em>True</em>, if gifts can be sent to the chat</td>",
|
||||
"rst_description": "*Optional*. :code:`True`, if gifts can be sent to the chat\n",
|
||||
"name": "can_send_gift",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "True",
|
||||
"description": "True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.",
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "InputFile or String",
|
||||
"type": "String",
|
||||
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
|
||||
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. <a href=\"#sending-files\">More information on Sending Files »</a></td>",
|
||||
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "InputFile or String",
|
||||
"type": "String",
|
||||
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
|
||||
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. <a href=\"#sending-files\">More information on Sending Files »</a></td>",
|
||||
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "InputFile or String",
|
||||
"type": "String",
|
||||
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
|
||||
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. <a href=\"#sending-files\">More information on Sending Files »</a></td>",
|
||||
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
|
||||
|
|
|
|||
|
|
@ -28,13 +28,29 @@
|
|||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "InputFile or String",
|
||||
"type": "String",
|
||||
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
|
||||
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. <a href=\"#sending-files\">More information on Sending Files »</a></td>",
|
||||
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
|
||||
"name": "thumbnail",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files",
|
||||
"html_description": "<td><em>Optional</em>. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. <a href=\"#sending-files\">More information on Sending Files »</a></td>",
|
||||
"rst_description": "*Optional*. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. :ref:`More information on Sending Files » <sending-files>`\n",
|
||||
"name": "cover",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Start timestamp for the video in the message",
|
||||
"html_description": "<td><em>Optional</em>. Start timestamp for the video in the message</td>",
|
||||
"rst_description": "*Optional*. Start timestamp for the video in the message\n",
|
||||
"name": "start_timestamp",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Caption of the video to be sent, 0-1024 characters after entities parsing",
|
||||
|
|
|
|||
|
|
@ -9,9 +9,29 @@ annotations:
|
|||
references:
|
||||
category: types
|
||||
name: InputFile
|
||||
cover:
|
||||
parsed_type:
|
||||
type: union
|
||||
items:
|
||||
- type: std
|
||||
name: str
|
||||
- type: entity
|
||||
references:
|
||||
category: types
|
||||
name: InputFile
|
||||
thumbnail:
|
||||
parsed_type:
|
||||
type: entity
|
||||
references:
|
||||
category: types
|
||||
name: InputFile
|
||||
start_timestamp:
|
||||
parsed_type:
|
||||
type: union
|
||||
items:
|
||||
- type: std
|
||||
name: datetime.datetime
|
||||
- type: std
|
||||
name: datetime.timedelta
|
||||
- type: std
|
||||
name: int
|
||||
|
|
|
|||
|
|
@ -28,13 +28,29 @@
|
|||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "InputFile or String",
|
||||
"type": "String",
|
||||
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
|
||||
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. <a href=\"#sending-files\">More information on Sending Files »</a></td>",
|
||||
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
|
||||
"name": "thumbnail",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files",
|
||||
"html_description": "<td><em>Optional</em>. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. <a href=\"#sending-files\">More information on Sending Files »</a></td>",
|
||||
"rst_description": "*Optional*. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. :ref:`More information on Sending Files » <sending-files>`\n",
|
||||
"name": "cover",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Start timestamp for the video in the message",
|
||||
"html_description": "<td><em>Optional</em>. Start timestamp for the video in the message</td>",
|
||||
"rst_description": "*Optional*. Start timestamp for the video in the message\n",
|
||||
"name": "start_timestamp",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Video width",
|
||||
|
|
|
|||
|
|
@ -9,3 +9,29 @@ annotations:
|
|||
references:
|
||||
category: types
|
||||
name: InputFile
|
||||
cover:
|
||||
parsed_type:
|
||||
type: union
|
||||
items:
|
||||
- type: std
|
||||
name: str
|
||||
- type: entity
|
||||
references:
|
||||
category: types
|
||||
name: InputFile
|
||||
thumbnail:
|
||||
parsed_type:
|
||||
type: entity
|
||||
references:
|
||||
category: types
|
||||
name: InputFile
|
||||
start_timestamp:
|
||||
parsed_type:
|
||||
type: union
|
||||
items:
|
||||
- type: std
|
||||
name: datetime.datetime
|
||||
- type: std
|
||||
name: datetime.timedelta
|
||||
- type: std
|
||||
name: int
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
"object": {
|
||||
"anchor": "startransaction",
|
||||
"name": "StarTransaction",
|
||||
"description": "Describes a Telegram Star transaction.",
|
||||
"html_description": "<p>Describes a Telegram Star transaction.</p>",
|
||||
"rst_description": "Describes a Telegram Star transaction.",
|
||||
"description": "Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.",
|
||||
"html_description": "<p>Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.</p>",
|
||||
"rst_description": "Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
"object": {
|
||||
"anchor": "successfulpayment",
|
||||
"name": "SuccessfulPayment",
|
||||
"description": "This object contains basic information about a successful payment.",
|
||||
"html_description": "<p>This object contains basic information about a successful payment.</p>",
|
||||
"rst_description": "This object contains basic information about a successful payment.",
|
||||
"description": "This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control.",
|
||||
"html_description": "<p>This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control.</p>",
|
||||
"rst_description": "This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
"object": {
|
||||
"anchor": "transactionpartner",
|
||||
"name": "TransactionPartner",
|
||||
"description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n - TransactionPartnerUser\n - TransactionPartnerAffiliateProgram\n - TransactionPartnerFragment\n - TransactionPartnerTelegramAds\n - TransactionPartnerTelegramApi\n - TransactionPartnerOther",
|
||||
"html_description": "<p>This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of</p><ul>\n<li><a href=\"#transactionpartneruser\">TransactionPartnerUser</a></li>\n<li><a href=\"#transactionpartneraffiliateprogram\">TransactionPartnerAffiliateProgram</a></li>\n<li><a href=\"#transactionpartnerfragment\">TransactionPartnerFragment</a></li>\n<li><a href=\"#transactionpartnertelegramads\">TransactionPartnerTelegramAds</a></li>\n<li><a href=\"#transactionpartnertelegramapi\">TransactionPartnerTelegramApi</a></li>\n<li><a href=\"#transactionpartnerother\">TransactionPartnerOther</a></li>\n</ul>",
|
||||
"rst_description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram`\n - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`\n - :class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`",
|
||||
"description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n - TransactionPartnerUser\n - TransactionPartnerChat\n - TransactionPartnerAffiliateProgram\n - TransactionPartnerFragment\n - TransactionPartnerTelegramAds\n - TransactionPartnerTelegramApi\n - TransactionPartnerOther",
|
||||
"html_description": "<p>This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of</p><ul>\n<li><a href=\"#transactionpartneruser\">TransactionPartnerUser</a></li>\n<li><a href=\"#transactionpartnerchat\">TransactionPartnerChat</a></li>\n<li><a href=\"#transactionpartneraffiliateprogram\">TransactionPartnerAffiliateProgram</a></li>\n<li><a href=\"#transactionpartnerfragment\">TransactionPartnerFragment</a></li>\n<li><a href=\"#transactionpartnertelegramads\">TransactionPartnerTelegramAds</a></li>\n<li><a href=\"#transactionpartnertelegramapi\">TransactionPartnerTelegramApi</a></li>\n<li><a href=\"#transactionpartnerother\">TransactionPartnerOther</a></li>\n</ul>",
|
||||
"rst_description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_chat.TransactionPartnerChat`\n - :class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram`\n - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`\n - :class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`",
|
||||
"annotations": [],
|
||||
"category": "types"
|
||||
}
|
||||
|
|
|
|||
41
.butcher/types/TransactionPartnerChat/entity.json
Normal file
41
.butcher/types/TransactionPartnerChat/entity.json
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Payments",
|
||||
"anchor": "payments"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "transactionpartnerchat",
|
||||
"name": "TransactionPartnerChat",
|
||||
"description": "Describes a transaction with a chat.",
|
||||
"html_description": "<p>Describes a transaction with a chat.</p>",
|
||||
"rst_description": "Describes a transaction with a chat.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Type of the transaction partner, always 'chat'",
|
||||
"html_description": "<td>Type of the transaction partner, always “chat”</td>",
|
||||
"rst_description": "Type of the transaction partner, always 'chat'\n",
|
||||
"name": "type",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Chat",
|
||||
"description": "Information about the chat",
|
||||
"html_description": "<td>Information about the chat</td>",
|
||||
"rst_description": "Information about the chat\n",
|
||||
"name": "chat",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Gift",
|
||||
"description": "The gift sent to the chat by the bot",
|
||||
"html_description": "<td><em>Optional</em>. The gift sent to the chat by the bot</td>",
|
||||
"rst_description": "*Optional*. The gift sent to the chat by the bot\n",
|
||||
"name": "gift",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
|
|
@ -59,6 +59,22 @@
|
|||
"name": "thumbnail",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Array of PhotoSize",
|
||||
"description": "Available sizes of the cover of the video in the message",
|
||||
"html_description": "<td><em>Optional</em>. Available sizes of the cover of the video in the message</td>",
|
||||
"rst_description": "*Optional*. Available sizes of the cover of the video in the message\n",
|
||||
"name": "cover",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Timestamp in seconds from which the video will play in the message",
|
||||
"html_description": "<td><em>Optional</em>. Timestamp in seconds from which the video will play in the message</td>",
|
||||
"rst_description": "*Optional*. Timestamp in seconds from which the video will play in the message\n",
|
||||
"name": "start_timestamp",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Original filename as defined by the sender",
|
||||
|
|
|
|||
5
.butcher/types/Video/replace.yml
Normal file
5
.butcher/types/Video/replace.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
annotations:
|
||||
start_timestamp:
|
||||
parsed_type:
|
||||
type: std
|
||||
name: datetime.datetime
|
||||
Loading…
Add table
Add a link
Reference in a new issue