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:
Alex Root Junior 2025-02-16 22:37:18 +02:00 committed by GitHub
parent 25833b830e
commit d8b9ce1be9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 660 additions and 118 deletions

View file

@ -1 +1 @@
8.2 8.3

View file

@ -13,3 +13,4 @@ multi_parse:
- TransactionPartnerTelegramAds - TransactionPartnerTelegramAds
- TransactionPartnerTelegramApi - TransactionPartnerTelegramApi
- TransactionPartnerAffiliateProgram - TransactionPartnerAffiliateProgram
- TransactionPartnerChat

View file

@ -38,9 +38,9 @@
{ {
"type": "String", "type": "String",
"required": false, "required": false,
"description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", "description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.",
"html_description": "<td>Required if <em>ok</em> is <em>False</em>. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.</td>", "html_description": "<td>Required if <em>ok</em> is <em>False</em>. Error message in human readable form that explains why it is impossible to complete the order (e.g. &#8220;Sorry, delivery to your desired address is unavailable&#8221;). Telegram will display this message to the user.</td>",
"rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n", "rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n",
"name": "error_message" "name": "error_message"
} }
], ],

View file

@ -43,6 +43,14 @@
"rst_description": "Message identifier in the chat specified in *from_chat_id*\n", "rst_description": "Message identifier in the chat specified in *from_chat_id*\n",
"name": "message_id" "name": "message_id"
}, },
{
"type": "Integer",
"required": false,
"description": "New start timestamp for the copied video in the message",
"html_description": "<td>New start timestamp for the copied video in the message</td>",
"rst_description": "New start timestamp for the copied video in the message\n",
"name": "video_start_timestamp"
},
{ {
"type": "String", "type": "String",
"required": false, "required": false,

View file

@ -0,0 +1,11 @@
annotations:
video_start_timestamp:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -35,6 +35,14 @@
"rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n", "rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n",
"name": "from_chat_id" "name": "from_chat_id"
}, },
{
"type": "Integer",
"required": false,
"description": "New start timestamp for the forwarded video in the message",
"html_description": "<td>New start timestamp for the forwarded video in the message</td>",
"rst_description": "New start timestamp for the forwarded video in the message\n",
"name": "video_start_timestamp"
},
{ {
"type": "Boolean", "type": "Boolean",
"required": false, "required": false,

View file

@ -0,0 +1,11 @@
annotations:
video_start_timestamp:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -7,9 +7,9 @@
"object": { "object": {
"anchor": "getavailablegifts", "anchor": "getavailablegifts",
"name": "getAvailableGifts", "name": "getAvailableGifts",
"description": "Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object.", "description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.",
"html_description": "<p>Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a <a href=\"#gifts\">Gifts</a> object.</p>", "html_description": "<p>Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a <a href=\"#gifts\">Gifts</a> object.</p>",
"rst_description": "Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object.", "rst_description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object.",
"annotations": [], "annotations": [],
"category": "methods" "category": "methods"
} }

View file

@ -8,8 +8,8 @@
"anchor": "removechatverification", "anchor": "removechatverification",
"name": "removeChatVerification", "name": "removeChatVerification",
"description": "Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.", "description": "Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.",
"html_description": "<p>Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns <em>True</em> on success.</p>", "html_description": "<p>Removes verification from a chat that is currently verified <a href=\"https://telegram.org/verify#third-party-verification\">on behalf of the organization</a> represented by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns :code:`True` on success.", "rst_description": "Removes verification from a chat that is currently verified `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ represented by the bot. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer or String", "type": "Integer or String",

View file

@ -8,8 +8,8 @@
"anchor": "removeuserverification", "anchor": "removeuserverification",
"name": "removeUserVerification", "name": "removeUserVerification",
"description": "Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.", "description": "Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.",
"html_description": "<p>Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns <em>True</em> on success.</p>", "html_description": "<p>Removes verification from a user who is currently verified <a href=\"https://telegram.org/verify#third-party-verification\">on behalf of the organization</a> represented by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns :code:`True` on success.", "rst_description": "Removes verification from a user who is currently verified `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ represented by the bot. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer", "type": "Integer",

View file

@ -7,18 +7,26 @@
"object": { "object": {
"anchor": "sendgift", "anchor": "sendgift",
"name": "sendGift", "name": "sendGift",
"description": "Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success.", "description": "Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.",
"html_description": "<p>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.</p>", "html_description": "<p>Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns <em>True</em> on success.</p>",
"rst_description": "Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns :code:`True` on success.", "rst_description": "Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer", "type": "Integer",
"required": true, "required": false,
"description": "Unique identifier of the target user that will receive the gift", "description": "Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.",
"html_description": "<td>Unique identifier of the target user that will receive the gift</td>", "html_description": "<td>Required if <em>chat_id</em> is not specified. Unique identifier of the target user who will receive the gift.</td>",
"rst_description": "Unique identifier of the target user that will receive the gift\n", "rst_description": "Required if *chat_id* is not specified. Unique identifier of the target user who will receive the gift.\n",
"name": "user_id" "name": "user_id"
}, },
{
"type": "Integer or String",
"required": false,
"description": "Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.",
"html_description": "<td>Required if <em>user_id</em> is not specified. Unique identifier for the chat or username of the channel (in the format <code>@channelusername</code>) that will receive the gift.</td>",
"rst_description": "Required if *user_id* is not specified. Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) that will receive the gift.\n",
"name": "chat_id"
},
{ {
"type": "String", "type": "String",
"required": true, "required": true,

View file

@ -75,6 +75,22 @@
"rst_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>. :ref:`More information on Sending Files » <sending-files>`\n", "rst_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>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail" "name": "thumbnail"
}, },
{
"type": "InputFile or String",
"required": false,
"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>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 &#8220;attach://&lt;file_attach_name&gt;&#8221; to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_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. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "cover"
},
{
"type": "Integer",
"required": false,
"description": "Start timestamp for the video in the message",
"html_description": "<td>Start timestamp for the video in the message</td>",
"rst_description": "Start timestamp for the video in the message\n",
"name": "start_timestamp"
},
{ {
"type": "String", "type": "String",
"required": false, "required": false,

View file

@ -5,3 +5,13 @@ annotations:
references: references:
category: types category: types
name: InputFile name: InputFile
start_timestamp:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -7,9 +7,9 @@
"object": { "object": {
"anchor": "setmessagereaction", "anchor": "setmessagereaction",
"name": "setMessageReaction", "name": "setMessageReaction",
"description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.", "description": "Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.",
"html_description": "<p>Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns <em>True</em> on success.</p>", "html_description": "<p>Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success.", "rst_description": "Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer or String", "type": "Integer or String",

View file

@ -8,8 +8,8 @@
"anchor": "verifychat", "anchor": "verifychat",
"name": "verifyChat", "name": "verifyChat",
"description": "Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.", "description": "Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.",
"html_description": "<p>Verifies a chat on behalf of the organization which is represented by the bot. Returns <em>True</em> on success.</p>", "html_description": "<p>Verifies a chat <a href=\"https://telegram.org/verify#third-party-verification\">on behalf of the organization</a> which is represented by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Verifies a chat on behalf of the organization which is represented by the bot. Returns :code:`True` on success.", "rst_description": "Verifies a chat `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ which is represented by the bot. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer or String", "type": "Integer or String",

View file

@ -8,8 +8,8 @@
"anchor": "verifyuser", "anchor": "verifyuser",
"name": "verifyUser", "name": "verifyUser",
"description": "Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.", "description": "Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.",
"html_description": "<p>Verifies a user on behalf of the organization which is represented by the bot. Returns <em>True</em> on success.</p>", "html_description": "<p>Verifies a user <a href=\"https://telegram.org/verify#third-party-verification\">on behalf of the organization</a> which is represented by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Verifies a user on behalf of the organization which is represented by the bot. Returns :code:`True` on success.", "rst_description": "Verifies a user `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ which is represented by the bot. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer", "type": "Integer",

View file

@ -1,7 +1,7 @@
{ {
"api": { "api": {
"version": "8.2", "version": "8.3",
"release_date": "2025-01-01" "release_date": "2025-02-12"
}, },
"items": [ "items": [
{ {
@ -869,6 +869,14 @@
"name": "permissions", "name": "permissions",
"required": false "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", "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.", "description": "True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.",
@ -2625,6 +2633,22 @@
"name": "thumbnail", "name": "thumbnail",
"required": false "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", "type": "String",
"description": "Original filename as defined by the sender", "description": "Original filename as defined by the sender",
@ -7270,13 +7294,29 @@
"required": true "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", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "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", "name": "thumbnail",
"required": false "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "type": "String",
"description": "Caption of the video to be sent, 0-1024 characters after entities parsing", "description": "Caption of the video to be sent, 0-1024 characters after entities parsing",
@ -7376,7 +7416,7 @@
"required": true "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", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "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",
@ -7474,7 +7514,7 @@
"required": true "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", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "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",
@ -7556,7 +7596,7 @@
"required": true "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", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "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",
@ -7666,13 +7706,29 @@
"required": true "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", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "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", "name": "thumbnail",
"required": false "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "type": "Integer",
"description": "Video width", "description": "Video width",
@ -7887,6 +7943,14 @@
"rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n", "rst_description": "Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)\n",
"name": "from_chat_id" "name": "from_chat_id"
}, },
{
"type": "Integer",
"required": false,
"description": "New start timestamp for the forwarded video in the message",
"html_description": "<td>New start timestamp for the forwarded video in the message</td>",
"rst_description": "New start timestamp for the forwarded video in the message\n",
"name": "video_start_timestamp"
},
{ {
"type": "Boolean", "type": "Boolean",
"required": false, "required": false,
@ -8011,6 +8075,14 @@
"rst_description": "Message identifier in the chat specified in *from_chat_id*\n", "rst_description": "Message identifier in the chat specified in *from_chat_id*\n",
"name": "message_id" "name": "message_id"
}, },
{
"type": "Integer",
"required": false,
"description": "New start timestamp for the copied video in the message",
"html_description": "<td>New start timestamp for the copied video in the message</td>",
"rst_description": "New start timestamp for the copied video in the message\n",
"name": "video_start_timestamp"
},
{ {
"type": "String", "type": "String",
"required": false, "required": false,
@ -8629,6 +8701,22 @@
"rst_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>. :ref:`More information on Sending Files » <sending-files>`\n", "rst_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>. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "thumbnail" "name": "thumbnail"
}, },
{
"type": "InputFile or String",
"required": false,
"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>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 &#8220;attach://&lt;file_attach_name&gt;&#8221; to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>",
"rst_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. :ref:`More information on Sending Files » <sending-files>`\n",
"name": "cover"
},
{
"type": "Integer",
"required": false,
"description": "Start timestamp for the video in the message",
"html_description": "<td>Start timestamp for the video in the message</td>",
"rst_description": "Start timestamp for the video in the message\n",
"name": "start_timestamp"
},
{ {
"type": "String", "type": "String",
"required": false, "required": false,
@ -10049,9 +10137,9 @@
{ {
"anchor": "setmessagereaction", "anchor": "setmessagereaction",
"name": "setMessageReaction", "name": "setMessageReaction",
"description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.", "description": "Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.",
"html_description": "<p>Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns <em>True</em> on success.</p>", "html_description": "<p>Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success.", "rst_description": "Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer or String", "type": "Integer or String",
@ -13306,27 +13394,35 @@
{ {
"anchor": "getavailablegifts", "anchor": "getavailablegifts",
"name": "getAvailableGifts", "name": "getAvailableGifts",
"description": "Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object.", "description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.",
"html_description": "<p>Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a <a href=\"#gifts\">Gifts</a> object.</p>", "html_description": "<p>Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a <a href=\"#gifts\">Gifts</a> object.</p>",
"rst_description": "Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object.", "rst_description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object.",
"annotations": [], "annotations": [],
"category": "methods" "category": "methods"
}, },
{ {
"anchor": "sendgift", "anchor": "sendgift",
"name": "sendGift", "name": "sendGift",
"description": "Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success.", "description": "Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.",
"html_description": "<p>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.</p>", "html_description": "<p>Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns <em>True</em> on success.</p>",
"rst_description": "Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns :code:`True` on success.", "rst_description": "Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer", "type": "Integer",
"required": true, "required": false,
"description": "Unique identifier of the target user that will receive the gift", "description": "Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.",
"html_description": "<td>Unique identifier of the target user that will receive the gift</td>", "html_description": "<td>Required if <em>chat_id</em> is not specified. Unique identifier of the target user who will receive the gift.</td>",
"rst_description": "Unique identifier of the target user that will receive the gift\n", "rst_description": "Required if *chat_id* is not specified. Unique identifier of the target user who will receive the gift.\n",
"name": "user_id" "name": "user_id"
}, },
{
"type": "Integer or String",
"required": false,
"description": "Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.",
"html_description": "<td>Required if <em>user_id</em> is not specified. Unique identifier for the chat or username of the channel (in the format <code>@channelusername</code>) that will receive the gift.</td>",
"rst_description": "Required if *user_id* is not specified. Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) that will receive the gift.\n",
"name": "chat_id"
},
{ {
"type": "String", "type": "String",
"required": true, "required": true,
@ -13374,8 +13470,8 @@
"anchor": "verifyuser", "anchor": "verifyuser",
"name": "verifyUser", "name": "verifyUser",
"description": "Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.", "description": "Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.",
"html_description": "<p>Verifies a user on behalf of the organization which is represented by the bot. Returns <em>True</em> on success.</p>", "html_description": "<p>Verifies a user <a href=\"https://telegram.org/verify#third-party-verification\">on behalf of the organization</a> which is represented by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Verifies a user on behalf of the organization which is represented by the bot. Returns :code:`True` on success.", "rst_description": "Verifies a user `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ which is represented by the bot. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer", "type": "Integer",
@ -13400,8 +13496,8 @@
"anchor": "verifychat", "anchor": "verifychat",
"name": "verifyChat", "name": "verifyChat",
"description": "Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.", "description": "Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.",
"html_description": "<p>Verifies a chat on behalf of the organization which is represented by the bot. Returns <em>True</em> on success.</p>", "html_description": "<p>Verifies a chat <a href=\"https://telegram.org/verify#third-party-verification\">on behalf of the organization</a> which is represented by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Verifies a chat on behalf of the organization which is represented by the bot. Returns :code:`True` on success.", "rst_description": "Verifies a chat `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ which is represented by the bot. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer or String", "type": "Integer or String",
@ -13426,8 +13522,8 @@
"anchor": "removeuserverification", "anchor": "removeuserverification",
"name": "removeUserVerification", "name": "removeUserVerification",
"description": "Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.", "description": "Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.",
"html_description": "<p>Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns <em>True</em> on success.</p>", "html_description": "<p>Removes verification from a user who is currently verified <a href=\"https://telegram.org/verify#third-party-verification\">on behalf of the organization</a> represented by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns :code:`True` on success.", "rst_description": "Removes verification from a user who is currently verified `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ represented by the bot. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer", "type": "Integer",
@ -13444,8 +13540,8 @@
"anchor": "removechatverification", "anchor": "removechatverification",
"name": "removeChatVerification", "name": "removeChatVerification",
"description": "Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.", "description": "Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.",
"html_description": "<p>Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns <em>True</em> on success.</p>", "html_description": "<p>Removes verification from a chat that is currently verified <a href=\"https://telegram.org/verify#third-party-verification\">on behalf of the organization</a> represented by the bot. Returns <em>True</em> on success.</p>",
"rst_description": "Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns :code:`True` on success.", "rst_description": "Removes verification from a chat that is currently verified `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ represented by the bot. Returns :code:`True` on success.",
"annotations": [ "annotations": [
{ {
"type": "Integer or String", "type": "Integer or String",
@ -16650,9 +16746,9 @@
{ {
"type": "String", "type": "String",
"required": false, "required": false,
"description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.", "description": "Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.",
"html_description": "<td>Required if <em>ok</em> is <em>False</em>. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.</td>", "html_description": "<td>Required if <em>ok</em> is <em>False</em>. Error message in human readable form that explains why it is impossible to complete the order (e.g. &#8220;Sorry, delivery to your desired address is unavailable&#8221;). Telegram will display this message to the user.</td>",
"rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n", "rst_description": "Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.\n",
"name": "error_message" "name": "error_message"
} }
], ],
@ -16991,9 +17087,9 @@
{ {
"anchor": "successfulpayment", "anchor": "successfulpayment",
"name": "SuccessfulPayment", "name": "SuccessfulPayment",
"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.</p>", "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.", "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": [ "annotations": [
{ {
"type": "String", "type": "String",
@ -17394,9 +17490,9 @@
{ {
"anchor": "transactionpartner", "anchor": "transactionpartner",
"name": "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", "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=\"#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>", "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_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`", "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": [], "annotations": [],
"category": "types" "category": "types"
}, },
@ -17474,6 +17570,40 @@
], ],
"category": "types" "category": "types"
}, },
{
"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 &#8220;chat&#8221;</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"
},
{ {
"anchor": "transactionpartneraffiliateprogram", "anchor": "transactionpartneraffiliateprogram",
"name": "TransactionPartnerAffiliateProgram", "name": "TransactionPartnerAffiliateProgram",
@ -17599,9 +17729,9 @@
{ {
"anchor": "startransaction", "anchor": "startransaction",
"name": "StarTransaction", "name": "StarTransaction",
"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.</p>", "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.", "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": [ "annotations": [
{ {
"type": "String", "type": "String",

View file

@ -259,6 +259,14 @@
"name": "permissions", "name": "permissions",
"required": false "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", "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.", "description": "True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.",

View file

@ -28,7 +28,7 @@
"required": true "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", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "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",

View file

@ -28,7 +28,7 @@
"required": true "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", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "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",

View file

@ -28,7 +28,7 @@
"required": true "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", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "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",

View file

@ -28,13 +28,29 @@
"required": true "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", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "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", "name": "thumbnail",
"required": false "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "type": "String",
"description": "Caption of the video to be sent, 0-1024 characters after entities parsing", "description": "Caption of the video to be sent, 0-1024 characters after entities parsing",

View file

@ -9,9 +9,29 @@ annotations:
references: references:
category: types category: types
name: InputFile name: InputFile
cover:
parsed_type:
type: union
items:
- type: std
name: str
- type: entity
references:
category: types
name: InputFile
thumbnail: thumbnail:
parsed_type: parsed_type:
type: entity type: entity
references: references:
category: types category: types
name: InputFile name: InputFile
start_timestamp:
parsed_type:
type: union
items:
- type: std
name: datetime.datetime
- type: std
name: datetime.timedelta
- type: std
name: int

View file

@ -28,13 +28,29 @@
"required": true "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", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</a></td>", "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "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", "name": "thumbnail",
"required": false "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 &#8220;attach://&lt;file_attach_name&gt;&#8221; to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href=\"#sending-files\">More information on Sending Files &#187;</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", "type": "Integer",
"description": "Video width", "description": "Video width",

View file

@ -9,3 +9,29 @@ annotations:
references: references:
category: types category: types
name: InputFile 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

View file

@ -7,9 +7,9 @@
"object": { "object": {
"anchor": "startransaction", "anchor": "startransaction",
"name": "StarTransaction", "name": "StarTransaction",
"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.</p>", "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.", "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": [ "annotations": [
{ {
"type": "String", "type": "String",

View file

@ -7,9 +7,9 @@
"object": { "object": {
"anchor": "successfulpayment", "anchor": "successfulpayment",
"name": "SuccessfulPayment", "name": "SuccessfulPayment",
"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.</p>", "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.", "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": [ "annotations": [
{ {
"type": "String", "type": "String",

View file

@ -7,9 +7,9 @@
"object": { "object": {
"anchor": "transactionpartner", "anchor": "transactionpartner",
"name": "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", "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=\"#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>", "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_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`", "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": [], "annotations": [],
"category": "types" "category": "types"
} }

View 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 &#8220;chat&#8221;</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"
}
}

View file

@ -59,6 +59,22 @@
"name": "thumbnail", "name": "thumbnail",
"required": false "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", "type": "String",
"description": "Original filename as defined by the sender", "description": "Original filename as defined by the sender",

View file

@ -0,0 +1,5 @@
annotations:
start_timestamp:
parsed_type:
type: std
name: datetime.datetime

10
CHANGES/1638.feature.rst Normal file
View file

@ -0,0 +1,10 @@
Added full support for the `Bot API 8.3 <https://core.telegram.org/bots/api-changelog#february-12-2025>`_:
- Added the parameter :code:`chat_id` to the method :class:`aiogram.methods.send_gift.SendGift`, allowing bots to send gifts to channel chats.
- Added the field :code:`can_send_gift` to the class :class:`aiogram.types.chat_full_info.ChatFullInfo`.
- Added the class :class:`aiogram.types.transaction_partner_chat.TransactionPartnerChat` describing transactions with chats.
- Added the fields :code:`cover` and :code:`start_timestamp` to the class :class:`aiogram.types.video.Video`, containing a message-specific cover and a start timestamp for the video.
- Added the parameters :code:`cover` and :code:`start_timestamp` to the method :class:`aiogram.methods.send_video.SendVideo`, allowing bots to specify a cover and a start timestamp for the videos they send.
- Added the fields :code:`cover` and :code:`start_timestamp` to the classes :class:`aiogram.types.input_media_video.InputMediaVideo` and :class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo`, allowing bots to edit video covers and start timestamps, and specify them for videos in albums and paid media.
- Added the parameter :code:`video_start_timestamp` to the methods :class:`aiogram.methods.forward_message.ForwardMessage` and :class:`aiogram.methods.copy_message.CopyMessage`, allowing bots to change the start timestamp for forwarded and copied videos.
- Allowed adding reactions to most types of service messages.

View file

@ -52,7 +52,7 @@ Features
- Asynchronous (`asyncio docs <https://docs.python.org/3/library/asyncio.html>`_, :pep:`492`) - Asynchronous (`asyncio docs <https://docs.python.org/3/library/asyncio.html>`_, :pep:`492`)
- Has type hints (:pep:`484`) and can be used with `mypy <http://mypy-lang.org/>`_ - Has type hints (:pep:`484`) and can be used with `mypy <http://mypy-lang.org/>`_
- Supports `PyPy <https://www.pypy.org/>`_ - Supports `PyPy <https://www.pypy.org/>`_
- Supports `Telegram Bot API 8.2 <https://core.telegram.org/bots/api>`_ and gets fast updates to the latest versions of the Bot API - Supports `Telegram Bot API 8.3 <https://core.telegram.org/bots/api>`_ and gets fast updates to the latest versions of the Bot API
- Telegram Bot API integration code was `autogenerated <https://github.com/aiogram/tg-codegen>`_ and can be easily re-generated when API gets updated - Telegram Bot API integration code was `autogenerated <https://github.com/aiogram/tg-codegen>`_ and can be easily re-generated when API gets updated
- Updates router (Blueprints) - Updates router (Blueprints)
- Has Finite State Machine - Has Finite State Machine

View file

@ -1,2 +1,2 @@
__version__ = "3.17.0" __version__ = "3.18.0"
__api_version__ = "8.2" __api_version__ = "8.3"

View file

@ -684,7 +684,7 @@ class Bot:
:param shipping_query_id: Unique identifier for the query to be answered :param shipping_query_id: Unique identifier for the query to be answered
:param ok: Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible) :param ok: Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible)
:param shipping_options: Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options. :param shipping_options: Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.
:param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user. :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
:param request_timeout: Request timeout :param request_timeout: Request timeout
:return: On success, :code:`True` is returned. :return: On success, :code:`True` is returned.
""" """
@ -861,6 +861,7 @@ class Bot:
from_chat_id: Union[int, str], from_chat_id: Union[int, str],
message_id: int, message_id: int,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
video_start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -887,6 +888,7 @@ class Bot:
:param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`) :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)
:param message_id: Message identifier in the chat specified in *from_chat_id* :param message_id: Message identifier in the chat specified in *from_chat_id*
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param video_start_timestamp: New start timestamp for the copied video in the message
:param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept :param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
:param parse_mode: Mode for parsing entities in the new caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the new caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*
@ -907,6 +909,7 @@ class Bot:
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_id=message_id, message_id=message_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
video_start_timestamp=video_start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,
@ -1615,6 +1618,7 @@ class Bot:
from_chat_id: Union[int, str], from_chat_id: Union[int, str],
message_id: int, message_id: int,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
video_start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
@ -1628,6 +1632,7 @@ class Bot:
:param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`) :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)
:param message_id: Message identifier in the chat specified in *from_chat_id* :param message_id: Message identifier in the chat specified in *from_chat_id*
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param video_start_timestamp: New start timestamp for the forwarded video in the message
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound. :param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the forwarded message from forwarding and saving :param protect_content: Protects the contents of the forwarded message from forwarding and saving
:param request_timeout: Request timeout :param request_timeout: Request timeout
@ -1639,6 +1644,7 @@ class Bot:
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_id=message_id, message_id=message_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
video_start_timestamp=video_start_timestamp,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
) )
@ -3275,6 +3281,8 @@ class Bot:
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[InputFile, str]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -3308,6 +3316,8 @@ class Bot:
:param width: Video width :param width: Video width
:param height: Video height :param height: Video height
:param thumbnail: 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>` :param thumbnail: 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>`
:param cover: 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>`
:param start_timestamp: Start timestamp for the video in the message
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -3335,6 +3345,8 @@ class Bot:
width=width, width=width,
height=height, height=height,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,
@ -4607,7 +4619,7 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> bool: ) -> bool:
""" """
Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success. Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setmessagereaction Source: https://core.telegram.org/bots/api#setmessagereaction
@ -4869,7 +4881,7 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> Gifts: ) -> Gifts:
""" """
Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object. Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object.
Source: https://core.telegram.org/bots/api#getavailablegifts Source: https://core.telegram.org/bots/api#getavailablegifts
@ -4938,8 +4950,9 @@ class Bot:
async def send_gift( async def send_gift(
self, self,
user_id: int,
gift_id: str, gift_id: str,
user_id: Optional[int] = None,
chat_id: Optional[Union[int, str]] = None,
pay_for_upgrade: Optional[bool] = None, pay_for_upgrade: Optional[bool] = None,
text: Optional[str] = None, text: Optional[str] = None,
text_parse_mode: Optional[str] = None, text_parse_mode: Optional[str] = None,
@ -4947,12 +4960,13 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> bool: ) -> bool:
""" """
Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns :code:`True` on success. Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#sendgift Source: https://core.telegram.org/bots/api#sendgift
:param user_id: Unique identifier of the target user that will receive the gift
:param gift_id: Identifier of the gift :param gift_id: Identifier of the gift
:param user_id: Required if *chat_id* is not specified. Unique identifier of the target user who will receive the gift.
:param chat_id: Required if *user_id* is not specified. Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) that will receive the gift.
:param pay_for_upgrade: Pass :code:`True` to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver :param pay_for_upgrade: Pass :code:`True` to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver
:param text: Text that will be shown along with the gift; 0-255 characters :param text: Text that will be shown along with the gift; 0-255 characters
:param text_parse_mode: Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored. :param text_parse_mode: Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.
@ -4962,8 +4976,9 @@ class Bot:
""" """
call = SendGift( call = SendGift(
user_id=user_id,
gift_id=gift_id, gift_id=gift_id,
user_id=user_id,
chat_id=chat_id,
pay_for_upgrade=pay_for_upgrade, pay_for_upgrade=pay_for_upgrade,
text=text, text=text,
text_parse_mode=text_parse_mode, text_parse_mode=text_parse_mode,
@ -5005,7 +5020,7 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> bool: ) -> bool:
""" """
Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns :code:`True` on success. Removes verification from a chat that is currently verified `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ represented by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#removechatverification Source: https://core.telegram.org/bots/api#removechatverification
@ -5025,7 +5040,7 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> bool: ) -> bool:
""" """
Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns :code:`True` on success. Removes verification from a user who is currently verified `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ represented by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#removeuserverification Source: https://core.telegram.org/bots/api#removeuserverification
@ -5046,7 +5061,7 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> bool: ) -> bool:
""" """
Verifies a chat on behalf of the organization which is represented by the bot. Returns :code:`True` on success. Verifies a chat `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ which is represented by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#verifychat Source: https://core.telegram.org/bots/api#verifychat
@ -5069,7 +5084,7 @@ class Bot:
request_timeout: Optional[int] = None, request_timeout: Optional[int] = None,
) -> bool: ) -> bool:
""" """
Verifies a user on behalf of the organization which is represented by the bot. Returns :code:`True` on success. Verifies a user `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ which is represented by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#verifyuser Source: https://core.telegram.org/bots/api#verifyuser

View file

@ -38,7 +38,7 @@ _ProxyType = Union[_ProxyChain, _ProxyBasic]
def _retrieve_basic(basic: _ProxyBasic) -> Dict[str, Any]: def _retrieve_basic(basic: _ProxyBasic) -> Dict[str, Any]:
from aiohttp_socks.utils import parse_proxy_url # type: ignore from aiohttp_socks.utils import parse_proxy_url
proxy_auth: Optional[BasicAuth] = None proxy_auth: Optional[BasicAuth] = None
@ -63,11 +63,7 @@ def _retrieve_basic(basic: _ProxyBasic) -> Dict[str, Any]:
def _prepare_connector(chain_or_plain: _ProxyType) -> Tuple[Type["TCPConnector"], Dict[str, Any]]: def _prepare_connector(chain_or_plain: _ProxyType) -> Tuple[Type["TCPConnector"], Dict[str, Any]]:
from aiohttp_socks import ( # type: ignore from aiohttp_socks import ChainProxyConnector, ProxyConnector, ProxyInfo
ChainProxyConnector,
ProxyConnector,
ProxyInfo,
)
# since tuple is Iterable(compatible with _ProxyChain) object, we assume that # since tuple is Iterable(compatible with _ProxyChain) object, we assume that
# user wants chained proxies if tuple is a pair of string(url) and BasicAuth # user wants chained proxies if tuple is a pair of string(url) and BasicAuth

View file

@ -14,3 +14,4 @@ class TransactionPartnerType(str, Enum):
TELEGRAM_ADS = "telegram_ads" TELEGRAM_ADS = "telegram_ads"
TELEGRAM_API = "telegram_api" TELEGRAM_API = "telegram_api"
AFFILIATE_PROGRAM = "affiliate_program" AFFILIATE_PROGRAM = "affiliate_program"
CHAT = "chat"

View file

@ -23,7 +23,7 @@ class AnswerShippingQuery(TelegramMethod[bool]):
shipping_options: Optional[list[ShippingOption]] = None shipping_options: Optional[list[ShippingOption]] = None
"""Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.""" """Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options."""
error_message: Optional[str] = None error_message: Optional[str] = None
"""Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.""" """Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user."""
if TYPE_CHECKING: if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!! # DO NOT EDIT MANUALLY!!!

View file

@ -1,5 +1,6 @@
from __future__ import annotations from __future__ import annotations
import datetime
from typing import TYPE_CHECKING, Any, Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from pydantic import Field from pydantic import Field
@ -35,6 +36,8 @@ class CopyMessage(TelegramMethod[MessageId]):
"""Message identifier in the chat specified in *from_chat_id*""" """Message identifier in the chat specified in *from_chat_id*"""
message_thread_id: Optional[int] = None message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
video_start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
"""New start timestamp for the copied video in the message"""
caption: Optional[str] = None caption: Optional[str] = None
"""New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept""" """New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept"""
parse_mode: Optional[Union[str, Default]] = Default("parse_mode") parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
@ -79,6 +82,9 @@ class CopyMessage(TelegramMethod[MessageId]):
from_chat_id: Union[int, str], from_chat_id: Union[int, str],
message_id: int, message_id: int,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
video_start_timestamp: Optional[
Union[datetime.datetime, datetime.timedelta, int]
] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -105,6 +111,7 @@ class CopyMessage(TelegramMethod[MessageId]):
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_id=message_id, message_id=message_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
video_start_timestamp=video_start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,

View file

@ -1,5 +1,6 @@
from __future__ import annotations from __future__ import annotations
import datetime
from typing import TYPE_CHECKING, Any, Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..client.default import Default from ..client.default import Default
@ -25,6 +26,8 @@ class ForwardMessage(TelegramMethod[Message]):
"""Message identifier in the chat specified in *from_chat_id*""" """Message identifier in the chat specified in *from_chat_id*"""
message_thread_id: Optional[int] = None message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
video_start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
"""New start timestamp for the forwarded video in the message"""
disable_notification: Optional[bool] = None disable_notification: Optional[bool] = None
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.""" """Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
protect_content: Optional[Union[bool, Default]] = Default("protect_content") protect_content: Optional[Union[bool, Default]] = Default("protect_content")
@ -41,6 +44,9 @@ class ForwardMessage(TelegramMethod[Message]):
from_chat_id: Union[int, str], from_chat_id: Union[int, str],
message_id: int, message_id: int,
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
video_start_timestamp: Optional[
Union[datetime.datetime, datetime.timedelta, int]
] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
**__pydantic_kwargs: Any, **__pydantic_kwargs: Any,
@ -54,6 +60,7 @@ class ForwardMessage(TelegramMethod[Message]):
from_chat_id=from_chat_id, from_chat_id=from_chat_id,
message_id=message_id, message_id=message_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
video_start_timestamp=video_start_timestamp,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
**__pydantic_kwargs, **__pydantic_kwargs,

View file

@ -6,7 +6,7 @@ from .base import TelegramMethod
class GetAvailableGifts(TelegramMethod[Gifts]): class GetAvailableGifts(TelegramMethod[Gifts]):
""" """
Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object. Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object.
Source: https://core.telegram.org/bots/api#getavailablegifts Source: https://core.telegram.org/bots/api#getavailablegifts
""" """

View file

@ -7,7 +7,7 @@ from .base import TelegramMethod
class RemoveChatVerification(TelegramMethod[bool]): class RemoveChatVerification(TelegramMethod[bool]):
""" """
Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns :code:`True` on success. Removes verification from a chat that is currently verified `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ represented by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#removechatverification Source: https://core.telegram.org/bots/api#removechatverification
""" """

View file

@ -7,7 +7,7 @@ from .base import TelegramMethod
class RemoveUserVerification(TelegramMethod[bool]): class RemoveUserVerification(TelegramMethod[bool]):
""" """
Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns :code:`True` on success. Removes verification from a user who is currently verified `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ represented by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#removeuserverification Source: https://core.telegram.org/bots/api#removeuserverification
""" """

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional, Union
from ..types.message_entity import MessageEntity from ..types.message_entity import MessageEntity
from .base import TelegramMethod from .base import TelegramMethod
@ -8,7 +8,7 @@ from .base import TelegramMethod
class SendGift(TelegramMethod[bool]): class SendGift(TelegramMethod[bool]):
""" """
Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns :code:`True` on success. Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#sendgift Source: https://core.telegram.org/bots/api#sendgift
""" """
@ -16,10 +16,12 @@ class SendGift(TelegramMethod[bool]):
__returning__ = bool __returning__ = bool
__api_method__ = "sendGift" __api_method__ = "sendGift"
user_id: int
"""Unique identifier of the target user that will receive the gift"""
gift_id: str gift_id: str
"""Identifier of the gift""" """Identifier of the gift"""
user_id: Optional[int] = None
"""Required if *chat_id* is not specified. Unique identifier of the target user who will receive the gift."""
chat_id: Optional[Union[int, str]] = None
"""Required if *user_id* is not specified. Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) that will receive the gift."""
pay_for_upgrade: Optional[bool] = None pay_for_upgrade: Optional[bool] = None
"""Pass :code:`True` to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver""" """Pass :code:`True` to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver"""
text: Optional[str] = None text: Optional[str] = None
@ -36,8 +38,9 @@ class SendGift(TelegramMethod[bool]):
def __init__( def __init__(
__pydantic__self__, __pydantic__self__,
*, *,
user_id: int,
gift_id: str, gift_id: str,
user_id: Optional[int] = None,
chat_id: Optional[Union[int, str]] = None,
pay_for_upgrade: Optional[bool] = None, pay_for_upgrade: Optional[bool] = None,
text: Optional[str] = None, text: Optional[str] = None,
text_parse_mode: Optional[str] = None, text_parse_mode: Optional[str] = None,
@ -49,8 +52,9 @@ class SendGift(TelegramMethod[bool]):
# Is needed only for type checking and IDE support without any additional plugins # Is needed only for type checking and IDE support without any additional plugins
super().__init__( super().__init__(
user_id=user_id,
gift_id=gift_id, gift_id=gift_id,
user_id=user_id,
chat_id=chat_id,
pay_for_upgrade=pay_for_upgrade, pay_for_upgrade=pay_for_upgrade,
text=text, text=text,
text_parse_mode=text_parse_mode, text_parse_mode=text_parse_mode,

View file

@ -1,5 +1,6 @@
from __future__ import annotations from __future__ import annotations
import datetime
from typing import TYPE_CHECKING, Any, Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from pydantic import Field from pydantic import Field
@ -44,6 +45,10 @@ class SendVideo(TelegramMethod[Message]):
"""Video height""" """Video height"""
thumbnail: Optional[InputFile] = None thumbnail: Optional[InputFile] = None
"""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>`""" """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>`"""
cover: Optional[Union[InputFile, str]] = None
"""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>`"""
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
"""Start timestamp for the video in the message"""
caption: Optional[str] = None caption: Optional[str] = None
"""Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing""" """Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing"""
parse_mode: Optional[Union[str, Default]] = Default("parse_mode") parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
@ -98,6 +103,8 @@ class SendVideo(TelegramMethod[Message]):
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[InputFile, str]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -131,6 +138,8 @@ class SendVideo(TelegramMethod[Message]):
width=width, width=width,
height=height, height=height,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,

View file

@ -6,7 +6,7 @@ from .base import TelegramMethod
class SetMessageReaction(TelegramMethod[bool]): class SetMessageReaction(TelegramMethod[bool]):
""" """
Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success. Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setmessagereaction Source: https://core.telegram.org/bots/api#setmessagereaction
""" """

View file

@ -7,7 +7,7 @@ from .base import TelegramMethod
class VerifyChat(TelegramMethod[bool]): class VerifyChat(TelegramMethod[bool]):
""" """
Verifies a chat on behalf of the organization which is represented by the bot. Returns :code:`True` on success. Verifies a chat `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ which is represented by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#verifychat Source: https://core.telegram.org/bots/api#verifychat
""" """

View file

@ -7,7 +7,7 @@ from .base import TelegramMethod
class VerifyUser(TelegramMethod[bool]): class VerifyUser(TelegramMethod[bool]):
""" """
Verifies a user on behalf of the organization which is represented by the bot. Returns :code:`True` on success. Verifies a user `on behalf of the organization <https://telegram.org/verify#third-party-verification>`_ which is represented by the bot. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#verifyuser Source: https://core.telegram.org/bots/api#verifyuser
""" """

View file

@ -218,6 +218,7 @@ from .switch_inline_query_chosen_chat import SwitchInlineQueryChosenChat
from .text_quote import TextQuote from .text_quote import TextQuote
from .transaction_partner import TransactionPartner from .transaction_partner import TransactionPartner
from .transaction_partner_affiliate_program import TransactionPartnerAffiliateProgram from .transaction_partner_affiliate_program import TransactionPartnerAffiliateProgram
from .transaction_partner_chat import TransactionPartnerChat
from .transaction_partner_fragment import TransactionPartnerFragment from .transaction_partner_fragment import TransactionPartnerFragment
from .transaction_partner_other import TransactionPartnerOther from .transaction_partner_other import TransactionPartnerOther
from .transaction_partner_telegram_ads import TransactionPartnerTelegramAds from .transaction_partner_telegram_ads import TransactionPartnerTelegramAds
@ -460,6 +461,7 @@ __all__ = (
"TextQuote", "TextQuote",
"TransactionPartner", "TransactionPartner",
"TransactionPartnerAffiliateProgram", "TransactionPartnerAffiliateProgram",
"TransactionPartnerChat",
"TransactionPartnerFragment", "TransactionPartnerFragment",
"TransactionPartnerOther", "TransactionPartnerOther",
"TransactionPartnerTelegramAds", "TransactionPartnerTelegramAds",

View file

@ -90,6 +90,8 @@ class ChatFullInfo(Chat):
"""*Optional*. The most recent pinned message (by sending date)""" """*Optional*. The most recent pinned message (by sending date)"""
permissions: Optional[ChatPermissions] = None permissions: Optional[ChatPermissions] = None
"""*Optional*. Default chat member permissions, for groups and supergroups""" """*Optional*. Default chat member permissions, for groups and supergroups"""
can_send_gift: Optional[bool] = None
"""*Optional*. :code:`True`, if gifts can be sent to the chat"""
can_send_paid_media: Optional[bool] = None can_send_paid_media: Optional[bool] = None
"""*Optional*. :code:`True`, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.""" """*Optional*. :code:`True`, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats."""
slow_mode_delay: Optional[int] = None slow_mode_delay: Optional[int] = None
@ -157,6 +159,7 @@ class ChatFullInfo(Chat):
invite_link: Optional[str] = None, invite_link: Optional[str] = None,
pinned_message: Optional[Message] = None, pinned_message: Optional[Message] = None,
permissions: Optional[ChatPermissions] = None, permissions: Optional[ChatPermissions] = None,
can_send_gift: Optional[bool] = None,
can_send_paid_media: Optional[bool] = None, can_send_paid_media: Optional[bool] = None,
slow_mode_delay: Optional[int] = None, slow_mode_delay: Optional[int] = None,
unrestrict_boost_count: Optional[int] = None, unrestrict_boost_count: Optional[int] = None,
@ -208,6 +211,7 @@ class ChatFullInfo(Chat):
invite_link=invite_link, invite_link=invite_link,
pinned_message=pinned_message, pinned_message=pinned_message,
permissions=permissions, permissions=permissions,
can_send_gift=can_send_gift,
can_send_paid_media=can_send_paid_media, can_send_paid_media=can_send_paid_media,
slow_mode_delay=slow_mode_delay, slow_mode_delay=slow_mode_delay,
unrestrict_boost_count=unrestrict_boost_count, unrestrict_boost_count=unrestrict_boost_count,

View file

@ -2340,6 +2340,8 @@ class ChatJoinRequest(TelegramObject):
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[InputFile, str]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -2377,6 +2379,8 @@ class ChatJoinRequest(TelegramObject):
:param width: Video width :param width: Video width
:param height: Video height :param height: Video height
:param thumbnail: 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>` :param thumbnail: 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>`
:param cover: 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>`
:param start_timestamp: Start timestamp for the video in the message
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2407,6 +2411,8 @@ class ChatJoinRequest(TelegramObject):
width=width, width=width,
height=height, height=height,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,
@ -2433,6 +2439,8 @@ class ChatJoinRequest(TelegramObject):
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[InputFile, str]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -2470,6 +2478,8 @@ class ChatJoinRequest(TelegramObject):
:param width: Video width :param width: Video width
:param height: Video height :param height: Video height
:param thumbnail: 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>` :param thumbnail: 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>`
:param cover: 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>`
:param start_timestamp: Start timestamp for the video in the message
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2500,6 +2510,8 @@ class ChatJoinRequest(TelegramObject):
width=width, width=width,
height=height, height=height,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,

View file

@ -1236,6 +1236,8 @@ class ChatMemberUpdated(TelegramObject):
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[InputFile, str]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -1273,6 +1275,8 @@ class ChatMemberUpdated(TelegramObject):
:param width: Video width :param width: Video width
:param height: Video height :param height: Video height
:param thumbnail: 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>` :param thumbnail: 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>`
:param cover: 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>`
:param start_timestamp: Start timestamp for the video in the message
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -1303,6 +1307,8 @@ class ChatMemberUpdated(TelegramObject):
width=width, width=width,
height=height, height=height,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,

View file

@ -2320,6 +2320,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[InputFile, str]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -2357,6 +2359,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param width: Video width :param width: Video width
:param height: Video height :param height: Video height
:param thumbnail: 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>` :param thumbnail: 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>`
:param cover: 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>`
:param start_timestamp: Start timestamp for the video in the message
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2391,6 +2395,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
width=width, width=width,
height=height, height=height,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,
@ -2417,6 +2423,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[InputFile, str]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -2453,6 +2461,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
:param width: Video width :param width: Video width
:param height: Video height :param height: Video height
:param thumbnail: 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>` :param thumbnail: 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>`
:param cover: 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>`
:param start_timestamp: Start timestamp for the video in the message
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2486,6 +2496,8 @@ class InaccessibleMessage(MaybeInaccessibleMessage):
width=width, width=width,
height=height, height=height,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,

View file

@ -1,5 +1,6 @@
from __future__ import annotations from __future__ import annotations
import datetime
from typing import TYPE_CHECKING, Any, Literal, Optional, Union from typing import TYPE_CHECKING, Any, Literal, Optional, Union
from ..client.default import Default from ..client.default import Default
@ -24,6 +25,10 @@ class InputMediaVideo(InputMedia):
"""File to send. 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>`""" """File to send. 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>`"""
thumbnail: Optional[InputFile] = None thumbnail: Optional[InputFile] = None
"""*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>`""" """*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>`"""
cover: Optional[Union[str, InputFile]] = None
"""*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>`"""
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
"""*Optional*. Start timestamp for the video in the message"""
caption: Optional[str] = None caption: Optional[str] = None
"""*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing"""
parse_mode: Optional[Union[str, Default]] = Default("parse_mode") parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
@ -53,6 +58,8 @@ class InputMediaVideo(InputMedia):
type: Literal[InputMediaType.VIDEO] = InputMediaType.VIDEO, type: Literal[InputMediaType.VIDEO] = InputMediaType.VIDEO,
media: Union[str, InputFile], media: Union[str, InputFile],
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[str, InputFile]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -74,6 +81,8 @@ class InputMediaVideo(InputMedia):
type=type, type=type,
media=media, media=media,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,

View file

@ -1,5 +1,6 @@
from __future__ import annotations from __future__ import annotations
import datetime
from typing import TYPE_CHECKING, Any, Literal, Optional, Union from typing import TYPE_CHECKING, Any, Literal, Optional, Union
from ..enums import InputPaidMediaType from ..enums import InputPaidMediaType
@ -18,8 +19,12 @@ class InputPaidMediaVideo(InputPaidMedia):
"""Type of the media, must be *video*""" """Type of the media, must be *video*"""
media: Union[str, InputFile] media: Union[str, InputFile]
"""File to send. 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>`""" """File to send. 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>`"""
thumbnail: Optional[Union[InputFile, str]] = None thumbnail: Optional[InputFile] = None
"""*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>`""" """*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>`"""
cover: Optional[Union[str, InputFile]] = None
"""*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>`"""
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
"""*Optional*. Start timestamp for the video in the message"""
width: Optional[int] = None width: Optional[int] = None
"""*Optional*. Video width""" """*Optional*. Video width"""
height: Optional[int] = None height: Optional[int] = None
@ -38,7 +43,9 @@ class InputPaidMediaVideo(InputPaidMedia):
*, *,
type: Literal[InputPaidMediaType.VIDEO] = InputPaidMediaType.VIDEO, type: Literal[InputPaidMediaType.VIDEO] = InputPaidMediaType.VIDEO,
media: Union[str, InputFile], media: Union[str, InputFile],
thumbnail: Optional[Union[InputFile, str]] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[str, InputFile]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
duration: Optional[int] = None, duration: Optional[int] = None,
@ -53,6 +60,8 @@ class InputPaidMediaVideo(InputPaidMedia):
type=type, type=type,
media=media, media=media,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
width=width, width=width,
height=height, height=height,
duration=duration, duration=duration,

View file

@ -2885,6 +2885,8 @@ class Message(MaybeInaccessibleMessage):
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[InputFile, str]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -2921,6 +2923,8 @@ class Message(MaybeInaccessibleMessage):
:param width: Video width :param width: Video width
:param height: Video height :param height: Video height
:param thumbnail: 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>` :param thumbnail: 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>`
:param cover: 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>`
:param start_timestamp: Start timestamp for the video in the message
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -2954,6 +2958,8 @@ class Message(MaybeInaccessibleMessage):
width=width, width=width,
height=height, height=height,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,
@ -2976,6 +2982,8 @@ class Message(MaybeInaccessibleMessage):
width: Optional[int] = None, width: Optional[int] = None,
height: Optional[int] = None, height: Optional[int] = None,
thumbnail: Optional[InputFile] = None, thumbnail: Optional[InputFile] = None,
cover: Optional[Union[InputFile, str]] = None,
start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -3013,6 +3021,8 @@ class Message(MaybeInaccessibleMessage):
:param width: Video width :param width: Video width
:param height: Video height :param height: Video height
:param thumbnail: 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>` :param thumbnail: 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>`
:param cover: 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>`
:param start_timestamp: Start timestamp for the video in the message
:param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the video caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*
@ -3047,6 +3057,8 @@ class Message(MaybeInaccessibleMessage):
width=width, width=width,
height=height, height=height,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,
@ -3551,6 +3563,7 @@ class Message(MaybeInaccessibleMessage):
self, self,
chat_id: Union[int, str], chat_id: Union[int, str],
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
video_start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
caption: Optional[str] = None, caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
caption_entities: Optional[list[MessageEntity]] = None, caption_entities: Optional[list[MessageEntity]] = None,
@ -3581,6 +3594,7 @@ class Message(MaybeInaccessibleMessage):
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param video_start_timestamp: New start timestamp for the copied video in the message
:param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept :param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
:param parse_mode: Mode for parsing entities in the new caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. :param parse_mode: Mode for parsing entities in the new caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode* :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*
@ -3608,6 +3622,7 @@ class Message(MaybeInaccessibleMessage):
message_id=self.message_id, message_id=self.message_id,
chat_id=chat_id, chat_id=chat_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
video_start_timestamp=video_start_timestamp,
caption=caption, caption=caption,
parse_mode=parse_mode, parse_mode=parse_mode,
caption_entities=caption_entities, caption_entities=caption_entities,
@ -3685,6 +3700,7 @@ class Message(MaybeInaccessibleMessage):
self, self,
chat_id: Union[int, str], chat_id: Union[int, str],
message_thread_id: Optional[int] = None, message_thread_id: Optional[int] = None,
video_start_timestamp: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
disable_notification: Optional[bool] = None, disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"), protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
**kwargs: Any, **kwargs: Any,
@ -3702,6 +3718,7 @@ class Message(MaybeInaccessibleMessage):
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param video_start_timestamp: New start timestamp for the forwarded video in the message
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound. :param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the forwarded message from forwarding and saving :param protect_content: Protects the contents of the forwarded message from forwarding and saving
:return: instance of method :class:`aiogram.methods.forward_message.ForwardMessage` :return: instance of method :class:`aiogram.methods.forward_message.ForwardMessage`
@ -3720,6 +3737,7 @@ class Message(MaybeInaccessibleMessage):
message_id=self.message_id, message_id=self.message_id,
chat_id=chat_id, chat_id=chat_id,
message_thread_id=message_thread_id, message_thread_id=message_thread_id,
video_start_timestamp=video_start_timestamp,
disable_notification=disable_notification, disable_notification=disable_notification,
protect_content=protect_content, protect_content=protect_content,
**kwargs, **kwargs,
@ -4173,7 +4191,7 @@ class Message(MaybeInaccessibleMessage):
- :code:`message_id` - :code:`message_id`
- :code:`business_connection_id` - :code:`business_connection_id`
Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success. Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#setmessagereaction Source: https://core.telegram.org/bots/api#setmessagereaction

View file

@ -73,7 +73,7 @@ class ShippingQuery(TelegramObject):
:param ok: Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible) :param ok: Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible)
:param shipping_options: Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options. :param shipping_options: Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.
:param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user. :param error_message: Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. 'Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
:return: instance of method :class:`aiogram.methods.answer_shipping_query.AnswerShippingQuery` :return: instance of method :class:`aiogram.methods.answer_shipping_query.AnswerShippingQuery`
""" """
# DO NOT EDIT MANUALLY!!! # DO NOT EDIT MANUALLY!!!

View file

@ -9,6 +9,7 @@ if TYPE_CHECKING:
from .transaction_partner_affiliate_program import ( from .transaction_partner_affiliate_program import (
TransactionPartnerAffiliateProgram, TransactionPartnerAffiliateProgram,
) )
from .transaction_partner_chat import TransactionPartnerChat
from .transaction_partner_fragment import TransactionPartnerFragment from .transaction_partner_fragment import TransactionPartnerFragment
from .transaction_partner_other import TransactionPartnerOther from .transaction_partner_other import TransactionPartnerOther
from .transaction_partner_telegram_ads import TransactionPartnerTelegramAds from .transaction_partner_telegram_ads import TransactionPartnerTelegramAds
@ -18,7 +19,7 @@ if TYPE_CHECKING:
class StarTransaction(TelegramObject): class StarTransaction(TelegramObject):
""" """
Describes a Telegram Star transaction. 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.
Source: https://core.telegram.org/bots/api#startransaction Source: https://core.telegram.org/bots/api#startransaction
""" """
@ -34,6 +35,7 @@ class StarTransaction(TelegramObject):
source: Optional[ source: Optional[
Union[ Union[
TransactionPartnerUser, TransactionPartnerUser,
TransactionPartnerChat,
TransactionPartnerAffiliateProgram, TransactionPartnerAffiliateProgram,
TransactionPartnerFragment, TransactionPartnerFragment,
TransactionPartnerTelegramAds, TransactionPartnerTelegramAds,
@ -45,6 +47,7 @@ class StarTransaction(TelegramObject):
receiver: Optional[ receiver: Optional[
Union[ Union[
TransactionPartnerUser, TransactionPartnerUser,
TransactionPartnerChat,
TransactionPartnerAffiliateProgram, TransactionPartnerAffiliateProgram,
TransactionPartnerFragment, TransactionPartnerFragment,
TransactionPartnerTelegramAds, TransactionPartnerTelegramAds,
@ -68,6 +71,7 @@ class StarTransaction(TelegramObject):
source: Optional[ source: Optional[
Union[ Union[
TransactionPartnerUser, TransactionPartnerUser,
TransactionPartnerChat,
TransactionPartnerAffiliateProgram, TransactionPartnerAffiliateProgram,
TransactionPartnerFragment, TransactionPartnerFragment,
TransactionPartnerTelegramAds, TransactionPartnerTelegramAds,
@ -78,6 +82,7 @@ class StarTransaction(TelegramObject):
receiver: Optional[ receiver: Optional[
Union[ Union[
TransactionPartnerUser, TransactionPartnerUser,
TransactionPartnerChat,
TransactionPartnerAffiliateProgram, TransactionPartnerAffiliateProgram,
TransactionPartnerFragment, TransactionPartnerFragment,
TransactionPartnerTelegramAds, TransactionPartnerTelegramAds,

View file

@ -10,7 +10,7 @@ if TYPE_CHECKING:
class SuccessfulPayment(TelegramObject): class SuccessfulPayment(TelegramObject):
""" """
This object contains basic information about a successful payment. 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.
Source: https://core.telegram.org/bots/api#successfulpayment Source: https://core.telegram.org/bots/api#successfulpayment
""" """

View file

@ -6,6 +6,7 @@ class TransactionPartner(TelegramObject):
This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of
- :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser` - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`
- :class:`aiogram.types.transaction_partner_chat.TransactionPartnerChat`
- :class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram` - :class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram`
- :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment` - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`
- :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds` - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`

View file

@ -0,0 +1,43 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Literal, Optional
from ..enums import TransactionPartnerType
from .transaction_partner import TransactionPartner
if TYPE_CHECKING:
from .chat import Chat
from .gift import Gift
class TransactionPartnerChat(TransactionPartner):
"""
Describes a transaction with a chat.
Source: https://core.telegram.org/bots/api#transactionpartnerchat
"""
type: Literal[TransactionPartnerType.CHAT] = TransactionPartnerType.CHAT
"""Type of the transaction partner, always 'chat'"""
chat: Chat
"""Information about the chat"""
gift: Optional[Gift] = None
"""*Optional*. The gift sent to the chat by the bot"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
type: Literal[TransactionPartnerType.CHAT] = TransactionPartnerType.CHAT,
chat: Chat,
gift: Optional[Gift] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(type=type, chat=chat, gift=gift, **__pydantic_kwargs)

View file

@ -1,5 +1,6 @@
from __future__ import annotations from __future__ import annotations
import datetime
from typing import TYPE_CHECKING, Any, Optional from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject from .base import TelegramObject
@ -27,6 +28,10 @@ class Video(TelegramObject):
"""Duration of the video in seconds as defined by the sender""" """Duration of the video in seconds as defined by the sender"""
thumbnail: Optional[PhotoSize] = None thumbnail: Optional[PhotoSize] = None
"""*Optional*. Video thumbnail""" """*Optional*. Video thumbnail"""
cover: Optional[list[PhotoSize]] = None
"""*Optional*. Available sizes of the cover of the video in the message"""
start_timestamp: Optional[datetime.datetime] = None
"""*Optional*. Timestamp in seconds from which the video will play in the message"""
file_name: Optional[str] = None file_name: Optional[str] = None
"""*Optional*. Original filename as defined by the sender""" """*Optional*. Original filename as defined by the sender"""
mime_type: Optional[str] = None mime_type: Optional[str] = None
@ -47,6 +52,8 @@ class Video(TelegramObject):
height: int, height: int,
duration: int, duration: int,
thumbnail: Optional[PhotoSize] = None, thumbnail: Optional[PhotoSize] = None,
cover: Optional[list[PhotoSize]] = None,
start_timestamp: Optional[datetime.datetime] = None,
file_name: Optional[str] = None, file_name: Optional[str] = None,
mime_type: Optional[str] = None, mime_type: Optional[str] = None,
file_size: Optional[int] = None, file_size: Optional[int] = None,
@ -63,6 +70,8 @@ class Video(TelegramObject):
height=height, height=height,
duration=duration, duration=duration,
thumbnail=thumbnail, thumbnail=thumbnail,
cover=cover,
start_timestamp=start_timestamp,
file_name=file_name, file_name=file_name,
mime_type=mime_type, mime_type=mime_type,
file_size=file_size, file_size=file_size,

View file

@ -228,6 +228,7 @@ Payments
successful_payment successful_payment
transaction_partner transaction_partner
transaction_partner_affiliate_program transaction_partner_affiliate_program
transaction_partner_chat
transaction_partner_fragment transaction_partner_fragment
transaction_partner_other transaction_partner_other
transaction_partner_telegram_ads transaction_partner_telegram_ads

View file

@ -0,0 +1,10 @@
######################
TransactionPartnerChat
######################
.. automodule:: aiogram.types.transaction_partner_chat
:members:
:member-order: bysource
:undoc-members: True
:exclude-members: model_config,model_fields

View file

@ -303,6 +303,7 @@ module = [
"uvloop", "uvloop",
"redis.*", "redis.*",
"babel.*", "babel.*",
"aiohttp_socks.*",
] ]
ignore_missing_imports = true ignore_missing_imports = true
disallow_untyped_defs = true disallow_untyped_defs = true