Telegram Bot API 6.9 (#1319)

* Added support for Bot API 6.9

* Bump API

* Added changelog
This commit is contained in:
Alex Root Junior 2023-09-22 17:46:57 +03:00 committed by GitHub
parent a0828f6ddf
commit fec138977d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 277 additions and 110 deletions

View file

@ -1 +1 @@
6.8
6.9

View file

@ -30,9 +30,9 @@
{
"type": "Integer",
"required": false,
"description": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.",
"html_description": "<td>Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.</td>",
"rst_description": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.\n",
"description": "Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.",
"html_description": "<td>Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.</td>",
"rst_description": "Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.\n",
"name": "until_date"
},
{

View file

@ -46,9 +46,9 @@
{
"type": "Integer",
"required": false,
"description": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever",
"html_description": "<td>Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever</td>",
"rst_description": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever\n",
"description": "Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever",
"html_description": "<td>Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever</td>",
"rst_description": "Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever\n",
"name": "until_date"
}
],

View file

@ -1,7 +1,7 @@
{
"api": {
"version": "6.8",
"release_date": "2023-08-18"
"version": "6.9",
"release_date": "2023-09-22"
},
"items": [
{
@ -549,9 +549,9 @@
},
{
"type": "Integer",
"description": "Expiration date of the emoji status of the other party in a private chat, if any. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Expiration date of the emoji status of the other party in a private chat, if any. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Expiration date of the emoji status of the other party in a private chat, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"description": "Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "emoji_status_expiration_date",
"required": false
},
@ -1167,9 +1167,9 @@
},
{
"type": "WriteAccessAllowed",
"description": "Service message: the user allowed the bot added to the attachment menu to write messages",
"html_description": "<td><em>Optional</em>. Service message: the user allowed the bot added to the attachment menu to write messages</td>",
"rst_description": "*Optional*. Service message: the user allowed the bot added to the attachment menu to write messages\n",
"description": "Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess",
"html_description": "<td><em>Optional</em>. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a></td>",
"rst_description": "*Optional*. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"name": "write_access_allowed",
"required": false
},
@ -2454,17 +2454,33 @@
{
"anchor": "writeaccessallowed",
"name": "WriteAccessAllowed",
"description": "This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.",
"html_description": "<p>This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.</p>",
"rst_description": "This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.",
"description": "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.",
"html_description": "<p>This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a>.</p>",
"rst_description": "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_.",
"annotations": [
{
"type": "Boolean",
"description": "True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess",
"html_description": "<td><em>Optional</em>. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a></td>",
"rst_description": "*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"name": "from_request",
"required": false
},
{
"type": "String",
"description": "Name of the Web App which was launched from a link",
"html_description": "<td><em>Optional</em>. Name of the Web App which was launched from a link</td>",
"rst_description": "*Optional*. Name of the Web App which was launched from a link\n",
"description": "Name of the Web App, if the access was granted when the Web App was launched from a link",
"html_description": "<td><em>Optional</em>. Name of the Web App, if the access was granted when the Web App was launched from a link</td>",
"rst_description": "*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link\n",
"name": "web_app_name",
"required": false
},
{
"type": "Boolean",
"description": "True, if the access was granted when the bot was added to the attachment or side menu",
"html_description": "<td><em>Optional</em>. True, if the access was granted when the bot was added to the attachment or side menu</td>",
"rst_description": "*Optional*. True, if the access was granted when the bot was added to the attachment or side menu\n",
"name": "from_attachment_menu",
"required": false
}
],
"category": "types"
@ -2610,8 +2626,8 @@
{
"type": "String",
"description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps",
"html_description": "<td>An HTTPS URL of a Web App to be opened with additional data as specified in <a href=\"/bots/webapps#initializing-web-apps\">Initializing Web Apps</a></td>",
"rst_description": "An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps <https://core.telegram.org/bots/webapps#initializing-web-apps>`_\n",
"html_description": "<td>An HTTPS URL of a Web App to be opened with additional data as specified in <a href=\"/bots/webapps#initializing-mini-apps\">Initializing Web Apps</a></td>",
"rst_description": "An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"name": "url",
"required": true
}
@ -3335,9 +3351,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"description": "True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"name": "can_manage_chat",
"required": true
},
@ -3391,9 +3407,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n",
"description": "True, if the administrator can post messages in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only\n",
"name": "can_post_messages",
"required": false
},
@ -3413,6 +3429,30 @@
"name": "can_pin_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can post stories in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post stories in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post stories in the channel; channels only\n",
"name": "can_post_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can edit stories posted by other users; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit stories posted by other users; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only\n",
"name": "can_edit_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can delete stories posted by other users",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can delete stories posted by other users</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can delete stories posted by other users\n",
"name": "can_delete_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only",
@ -3516,9 +3556,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"description": "True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"name": "can_manage_chat",
"required": true
},
@ -3572,9 +3612,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n",
"description": "True, if the administrator can post messages in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only\n",
"name": "can_post_messages",
"required": false
},
@ -3594,6 +3634,30 @@
"name": "can_pin_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can post stories in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post stories in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post stories in the channel; channels only\n",
"name": "can_post_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can edit stories posted by other users; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit stories posted by other users; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only\n",
"name": "can_edit_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can delete stories posted by other users",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can delete stories posted by other users</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can delete stories posted by other users\n",
"name": "can_delete_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only",
@ -3784,9 +3848,9 @@
},
{
"type": "Integer",
"description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever",
"html_description": "<td>Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever</td>",
"rst_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever\n",
"description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever",
"html_description": "<td>Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever</td>",
"rst_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever\n",
"name": "until_date",
"required": true
}
@ -3844,9 +3908,9 @@
},
{
"type": "Integer",
"description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever",
"html_description": "<td>Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever</td>",
"rst_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever\n",
"description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever",
"html_description": "<td>Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever</td>",
"rst_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever\n",
"name": "until_date",
"required": true
}
@ -6821,9 +6885,9 @@
{
"type": "Integer",
"required": false,
"description": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.",
"html_description": "<td>Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.</td>",
"rst_description": "Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.\n",
"description": "Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.",
"html_description": "<td>Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.</td>",
"rst_description": "Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.\n",
"name": "until_date"
},
{
@ -6913,9 +6977,9 @@
{
"type": "Integer",
"required": false,
"description": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever",
"html_description": "<td>Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever</td>",
"rst_description": "Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever\n",
"description": "Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever",
"html_description": "<td>Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever</td>",
"rst_description": "Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever\n",
"name": "until_date"
}
],
@ -9681,8 +9745,8 @@
{
"type": "WebAppInfo",
"description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App.",
"html_description": "<td><em>Optional</em>. Description of the <a href=\"/bots/webapps\">Web App</a> that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method <a href=\"/bots/webapps#initializing-web-apps\">switchInlineQuery</a> inside the Web App.</td>",
"rst_description": "*Optional*. Description of the `Web App <https://core.telegram.org/bots/webapps>`_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method `switchInlineQuery <https://core.telegram.org/bots/webapps#initializing-web-apps>`_ inside the Web App.\n",
"html_description": "<td><em>Optional</em>. Description of the <a href=\"/bots/webapps\">Web App</a> that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method <a href=\"/bots/webapps#initializing-mini-apps\">switchInlineQuery</a> inside the Web App.</td>",
"rst_description": "*Optional*. Description of the `Web App <https://core.telegram.org/bots/webapps>`_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method `switchInlineQuery <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_ inside the Web App.\n",
"name": "web_app",
"required": false
},

View file

@ -93,9 +93,9 @@
},
{
"type": "Integer",
"description": "Expiration date of the emoji status of the other party in a private chat, if any. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Expiration date of the emoji status of the other party in a private chat, if any. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Expiration date of the emoji status of the other party in a private chat, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"description": "Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "emoji_status_expiration_date",
"required": false
},

View file

@ -21,9 +21,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"description": "True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"name": "can_manage_chat",
"required": true
},
@ -77,9 +77,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n",
"description": "True, if the administrator can post messages in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only\n",
"name": "can_post_messages",
"required": false
},
@ -99,6 +99,30 @@
"name": "can_pin_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can post stories in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post stories in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post stories in the channel; channels only\n",
"name": "can_post_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can edit stories posted by other users; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit stories posted by other users; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only\n",
"name": "can_edit_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can delete stories posted by other users",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can delete stories posted by other users</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can delete stories posted by other users\n",
"name": "can_delete_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only",

View file

@ -45,9 +45,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"description": "True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"name": "can_manage_chat",
"required": true
},
@ -101,9 +101,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n",
"description": "True, if the administrator can post messages in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only\n",
"name": "can_post_messages",
"required": false
},
@ -123,6 +123,30 @@
"name": "can_pin_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can post stories in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post stories in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post stories in the channel; channels only\n",
"name": "can_post_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can edit stories posted by other users; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit stories posted by other users; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only\n",
"name": "can_edit_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can delete stories posted by other users",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can delete stories posted by other users</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can delete stories posted by other users\n",
"name": "can_delete_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only",

View file

@ -29,9 +29,9 @@
},
{
"type": "Integer",
"description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever",
"html_description": "<td>Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever</td>",
"rst_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever\n",
"description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever",
"html_description": "<td>Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever</td>",
"rst_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever\n",
"name": "until_date",
"required": true
}

View file

@ -149,9 +149,9 @@
},
{
"type": "Integer",
"description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever",
"html_description": "<td>Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever</td>",
"rst_description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever\n",
"description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever",
"html_description": "<td>Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever</td>",
"rst_description": "Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever\n",
"name": "until_date",
"required": true
}

View file

@ -22,8 +22,8 @@
{
"type": "WebAppInfo",
"description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App.",
"html_description": "<td><em>Optional</em>. Description of the <a href=\"/bots/webapps\">Web App</a> that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method <a href=\"/bots/webapps#initializing-web-apps\">switchInlineQuery</a> inside the Web App.</td>",
"rst_description": "*Optional*. Description of the `Web App <https://core.telegram.org/bots/webapps>`_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method `switchInlineQuery <https://core.telegram.org/bots/webapps#initializing-web-apps>`_ inside the Web App.\n",
"html_description": "<td><em>Optional</em>. Description of the <a href=\"/bots/webapps\">Web App</a> that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method <a href=\"/bots/webapps#initializing-mini-apps\">switchInlineQuery</a> inside the Web App.</td>",
"rst_description": "*Optional*. Description of the `Web App <https://core.telegram.org/bots/webapps>`_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method `switchInlineQuery <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_ inside the Web App.\n",
"name": "web_app",
"required": false
},

View file

@ -469,9 +469,9 @@
},
{
"type": "WriteAccessAllowed",
"description": "Service message: the user allowed the bot added to the attachment menu to write messages",
"html_description": "<td><em>Optional</em>. Service message: the user allowed the bot added to the attachment menu to write messages</td>",
"rst_description": "*Optional*. Service message: the user allowed the bot added to the attachment menu to write messages\n",
"description": "Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess",
"html_description": "<td><em>Optional</em>. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a></td>",
"rst_description": "*Optional*. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"name": "write_access_allowed",
"required": false
},

View file

@ -14,8 +14,8 @@
{
"type": "String",
"description": "An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps",
"html_description": "<td>An HTTPS URL of a Web App to be opened with additional data as specified in <a href=\"/bots/webapps#initializing-web-apps\">Initializing Web Apps</a></td>",
"rst_description": "An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps <https://core.telegram.org/bots/webapps#initializing-web-apps>`_\n",
"html_description": "<td>An HTTPS URL of a Web App to be opened with additional data as specified in <a href=\"/bots/webapps#initializing-mini-apps\">Initializing Web Apps</a></td>",
"rst_description": "An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"name": "url",
"required": true
}

View file

@ -7,17 +7,33 @@
"object": {
"anchor": "writeaccessallowed",
"name": "WriteAccessAllowed",
"description": "This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.",
"html_description": "<p>This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.</p>",
"rst_description": "This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.",
"description": "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.",
"html_description": "<p>This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a>.</p>",
"rst_description": "This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_.",
"annotations": [
{
"type": "Boolean",
"description": "True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess",
"html_description": "<td><em>Optional</em>. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a></td>",
"rst_description": "*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"name": "from_request",
"required": false
},
{
"type": "String",
"description": "Name of the Web App which was launched from a link",
"html_description": "<td><em>Optional</em>. Name of the Web App which was launched from a link</td>",
"rst_description": "*Optional*. Name of the Web App which was launched from a link\n",
"description": "Name of the Web App, if the access was granted when the Web App was launched from a link",
"html_description": "<td><em>Optional</em>. Name of the Web App, if the access was granted when the Web App was launched from a link</td>",
"rst_description": "*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link\n",
"name": "web_app_name",
"required": false
},
{
"type": "Boolean",
"description": "True, if the access was granted when the bot was added to the attachment or side menu",
"html_description": "<td><em>Optional</em>. True, if the access was granted when the bot was added to the attachment or side menu</td>",
"rst_description": "*Optional*. True, if the access was granted when the bot was added to the attachment or side menu\n",
"name": "from_attachment_menu",
"required": false
}
],
"category": "types"

1
CHANGES/1319.feature.rst Normal file
View file

@ -0,0 +1 @@
Added full support of `Bot API 6.9 <https://core.telegram.org/bots/api-changelog#september-22-2023>`_

View file

@ -52,7 +52,7 @@ Features
- 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/>`_
- Supports `PyPy <https://www.pypy.org/>`_
- Supports `Telegram Bot API 6.8 <https://core.telegram.org/bots/api>`_ and gets fast updates to the latest versions of the Bot API
- Supports `Telegram Bot API 6.9 <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
- Updates router (Blueprints)
- Has Finite State Machine

View file

@ -1,2 +1,2 @@
__version__ = "3.0.1"
__api_version__ = "6.8"
__version__ = "3.1.0"
__api_version__ = "6.9"

View file

@ -713,7 +713,7 @@ class Bot:
:param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)
:param user_id: Unique identifier of the target user
:param until_date: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.
:param until_date: Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.
:param revoke_messages: Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
@ -2066,7 +2066,7 @@ class Bot:
:param user_id: Unique identifier of the target user
:param permissions: A JSON-serialized object for new user permissions
:param use_independent_chat_permissions: Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.
:param until_date: Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever
:param until_date: Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""

View file

@ -21,7 +21,7 @@ class BanChatMember(TelegramMethod[bool]):
user_id: int
"""Unique identifier of the target user"""
until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
"""Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only."""
"""Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only."""
revoke_messages: Optional[bool] = None
"""Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels."""

View file

@ -26,7 +26,7 @@ class RestrictChatMember(TelegramMethod[bool]):
use_independent_chat_permissions: Optional[bool] = None
"""Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission."""
until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
"""Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever"""
"""Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -72,7 +72,7 @@ class Chat(TelegramObject):
emoji_status_custom_emoji_id: Optional[str] = None
"""*Optional*. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
emoji_status_expiration_date: Optional[DateTime] = None
"""*Optional*. Expiration date of the emoji status of the other party in a private chat, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
"""*Optional*. Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
bio: Optional[str] = None
"""*Optional*. Bio of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
has_private_forwards: Optional[bool] = None
@ -892,7 +892,7 @@ class Chat(TelegramObject):
:param user_id: Unique identifier of the target user
:param permissions: A JSON-serialized object for new user permissions
:param use_independent_chat_permissions: Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.
:param until_date: Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever
:param until_date: Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever
:return: instance of method :class:`aiogram.methods.restrict_chat_member.RestrictChatMember`
"""
# DO NOT EDIT MANUALLY!!!
@ -959,7 +959,7 @@ class Chat(TelegramObject):
Source: https://core.telegram.org/bots/api#banchatmember
:param user_id: Unique identifier of the target user
:param until_date: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.
:param until_date: Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.
:param revoke_messages: Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.
:return: instance of method :class:`aiogram.methods.ban_chat_member.BanChatMember`
"""

View file

@ -18,7 +18,7 @@ class ChatAdministratorRights(TelegramObject):
is_anonymous: bool
""":code:`True`, if the user's presence in the chat is hidden"""
can_manage_chat: bool
""":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"""
""":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"""
can_delete_messages: bool
""":code:`True`, if the administrator can delete messages of other users"""
can_manage_video_chats: bool
@ -32,11 +32,17 @@ class ChatAdministratorRights(TelegramObject):
can_invite_users: bool
""":code:`True`, if the user is allowed to invite new users to the chat"""
can_post_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post in the channel; channels only"""
"""*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only"""
can_edit_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
can_pin_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only"""
can_post_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post stories in the channel; channels only"""
can_edit_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only"""
can_delete_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can delete stories posted by other users"""
can_manage_topics: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""
@ -58,6 +64,9 @@ class ChatAdministratorRights(TelegramObject):
can_post_messages: Optional[bool] = None,
can_edit_messages: Optional[bool] = None,
can_pin_messages: Optional[bool] = None,
can_post_stories: Optional[bool] = None,
can_edit_stories: Optional[bool] = None,
can_delete_stories: Optional[bool] = None,
can_manage_topics: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
@ -77,6 +86,9 @@ class ChatAdministratorRights(TelegramObject):
can_post_messages=can_post_messages,
can_edit_messages=can_edit_messages,
can_pin_messages=can_pin_messages,
can_post_stories=can_post_stories,
can_edit_stories=can_edit_stories,
can_delete_stories=can_delete_stories,
can_manage_topics=can_manage_topics,
**__pydantic_kwargs,
)

View file

@ -25,7 +25,7 @@ class ChatMemberAdministrator(ChatMember):
is_anonymous: bool
""":code:`True`, if the user's presence in the chat is hidden"""
can_manage_chat: bool
""":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"""
""":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"""
can_delete_messages: bool
""":code:`True`, if the administrator can delete messages of other users"""
can_manage_video_chats: bool
@ -39,11 +39,17 @@ class ChatMemberAdministrator(ChatMember):
can_invite_users: bool
""":code:`True`, if the user is allowed to invite new users to the chat"""
can_post_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post in the channel; channels only"""
"""*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only"""
can_edit_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
can_pin_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only"""
can_post_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post stories in the channel; channels only"""
can_edit_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only"""
can_delete_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can delete stories posted by other users"""
can_manage_topics: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""
custom_title: Optional[str] = None
@ -70,6 +76,9 @@ class ChatMemberAdministrator(ChatMember):
can_post_messages: Optional[bool] = None,
can_edit_messages: Optional[bool] = None,
can_pin_messages: Optional[bool] = None,
can_post_stories: Optional[bool] = None,
can_edit_stories: Optional[bool] = None,
can_delete_stories: Optional[bool] = None,
can_manage_topics: Optional[bool] = None,
custom_title: Optional[str] = None,
**__pydantic_kwargs: Any,
@ -93,6 +102,9 @@ class ChatMemberAdministrator(ChatMember):
can_post_messages=can_post_messages,
can_edit_messages=can_edit_messages,
can_pin_messages=can_pin_messages,
can_post_stories=can_post_stories,
can_edit_stories=can_edit_stories,
can_delete_stories=can_delete_stories,
can_manage_topics=can_manage_topics,
custom_title=custom_title,
**__pydantic_kwargs,

View file

@ -22,7 +22,7 @@ class ChatMemberBanned(ChatMember):
user: User
"""Information about the user"""
until_date: DateTime
"""Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever"""
"""Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -52,7 +52,7 @@ class ChatMemberRestricted(ChatMember):
can_manage_topics: bool
""":code:`True`, if the user is allowed to create forum topics"""
until_date: DateTime
"""Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever"""
"""Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -18,7 +18,7 @@ class InlineQueryResultsButton(TelegramObject):
text: str
"""Label text on the button"""
web_app: Optional[WebAppInfo] = None
"""*Optional*. Description of the `Web App <https://core.telegram.org/bots/webapps>`_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method `switchInlineQuery <https://core.telegram.org/bots/webapps#initializing-web-apps>`_ inside the Web App."""
"""*Optional*. Description of the `Web App <https://core.telegram.org/bots/webapps>`_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method `switchInlineQuery <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_ inside the Web App."""
start_parameter: Optional[str] = None
"""*Optional*. `Deep-linking <https://core.telegram.org/bots/features#deep-linking>`_ parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed."""

View file

@ -223,7 +223,7 @@ class Message(TelegramObject):
connected_website: Optional[str] = None
"""*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login » <https://core.telegram.org/widgets/login>`_"""
write_access_allowed: Optional[WriteAccessAllowed] = None
"""*Optional*. Service message: the user allowed the bot added to the attachment menu to write messages"""
"""*Optional*. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_"""
passport_data: Optional[PassportData] = None
"""*Optional*. Telegram Passport data"""
proximity_alert_triggered: Optional[ProximityAlertTriggered] = None

View file

@ -13,7 +13,7 @@ class WebAppInfo(TelegramObject):
"""
url: str
"""An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps <https://core.telegram.org/bots/webapps#initializing-web-apps>`_"""
"""An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -5,23 +5,37 @@ from aiogram.types import TelegramObject
class WriteAccessAllowed(TelegramObject):
"""
This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.
This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_.
Source: https://core.telegram.org/bots/api#writeaccessallowed
"""
from_request: Optional[bool] = None
"""*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_"""
web_app_name: Optional[str] = None
"""*Optional*. Name of the Web App which was launched from a link"""
"""*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link"""
from_attachment_menu: Optional[bool] = None
"""*Optional*. True, if the access was granted when the bot was added to the attachment or side menu"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, web_app_name: Optional[str] = None, **__pydantic_kwargs: Any
__pydantic__self__,
*,
from_request: Optional[bool] = None,
web_app_name: Optional[str] = None,
from_attachment_menu: Optional[bool] = 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__(web_app_name=web_app_name, **__pydantic_kwargs)
super().__init__(
from_request=from_request,
web_app_name=web_app_name,
from_attachment_menu=from_attachment_menu,
**__pydantic_kwargs,
)

View file

@ -4,6 +4,7 @@ from os import getenv
from typing import Any, Dict, Union
from aiohttp import web
from finite_state_machine import form_router
from aiogram import Bot, Dispatcher, F, Router
from aiogram.client.session.aiohttp import AiohttpSession
@ -18,7 +19,6 @@ from aiogram.webhook.aiohttp_server import (
TokenBasedRequestHandler,
setup_application,
)
from finite_state_machine import form_router
main_router = Router()

View file

@ -154,9 +154,9 @@ features = [
"test",
"cli",
]
extra-dependencies = [
"butcher @ git+https://github.com/aiogram/butcher.git@v0.1.22",
]
#extra-dependencies = [
# "butcher @ git+https://github.com/aiogram/butcher.git@v0.1.22",
#]
[tool.hatch.envs.dev.scripts]
update = [