Added full support of Bot API 6.5

This commit is contained in:
Alex Root Junior 2023-02-03 21:05:01 +02:00
parent fad45c66aa
commit 505284e18b
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
27 changed files with 875 additions and 165 deletions

View file

@ -88,9 +88,9 @@
{
"type": "Boolean",
"required": false,
"description": "Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)",
"html_description": "<td>Pass <em>True</em> if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)</td>",
"rst_description": "Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)\n",
"description": "Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)",
"html_description": "<td>Pass <em>True</em> if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)</td>",
"rst_description": "Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)\n",
"name": "can_promote_members"
},
{

View file

@ -37,6 +37,14 @@
"rst_description": "A JSON-serialized object for new user permissions\n",
"name": "permissions"
},
{
"type": "Boolean",
"required": false,
"description": "Pass 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.",
"html_description": "<td>Pass <em>True</em> if chat permissions are set independently. Otherwise, the <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> permissions will imply the <em>can_send_messages</em>, <em>can_send_audios</em>, <em>can_send_documents</em>, <em>can_send_photos</em>, <em>can_send_videos</em>, <em>can_send_video_notes</em>, and <em>can_send_voice_notes</em> permissions; the <em>can_send_polls</em> permission will imply the <em>can_send_messages</em> permission.</td>",
"rst_description": "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.\n",
"name": "use_independent_chat_permissions"
},
{
"type": "Integer",
"required": false,

View file

@ -28,6 +28,14 @@
"html_description": "<td>A JSON-serialized object for new default chat permissions</td>",
"rst_description": "A JSON-serialized object for new default chat permissions\n",
"name": "permissions"
},
{
"type": "Boolean",
"required": false,
"description": "Pass 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.",
"html_description": "<td>Pass <em>True</em> if chat permissions are set independently. Otherwise, the <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> permissions will imply the <em>can_send_messages</em>, <em>can_send_audios</em>, <em>can_send_documents</em>, <em>can_send_photos</em>, <em>can_send_videos</em>, <em>can_send_video_notes</em>, and <em>can_send_voice_notes</em> permissions; the <em>can_send_polls</em> permission will imply the <em>can_send_messages</em> permission.</td>",
"rst_description": "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.\n",
"name": "use_independent_chat_permissions"
}
],
"category": "methods"

View file

@ -1,7 +1,7 @@
{
"api": {
"version": "6.4",
"release_date": "2022-12-30"
"version": "6.5",
"release_date": "2023-02-03"
},
"items": [
{
@ -1125,6 +1125,22 @@
"name": "successful_payment",
"required": false
},
{
"type": "UserShared",
"description": "Service message: a user was shared with the bot",
"html_description": "<td><em>Optional</em>. Service message: a user was shared with the bot</td>",
"rst_description": "*Optional*. Service message: a user was shared with the bot\n",
"name": "user_shared",
"required": false
},
{
"type": "ChatShared",
"description": "Service message: a chat was shared with the bot",
"html_description": "<td><em>Optional</em>. Service message: a chat was shared with the bot</td>",
"rst_description": "*Optional*. Service message: a chat was shared with the bot\n",
"name": "chat_shared",
"required": false
},
{
"type": "String",
"description": "The domain name of the website on which the user has logged in.",
@ -2350,6 +2366,58 @@
"annotations": [],
"category": "types"
},
{
"anchor": "usershared",
"name": "UserShared",
"description": "This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.",
"html_description": "<p>This object contains information about the user whose identifier was shared with the bot using a <a href=\"#keyboardbuttonrequestuser\">KeyboardButtonRequestUser</a> button.</p>",
"rst_description": "This object contains information about the user whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button.",
"annotations": [
{
"type": "Integer",
"description": "Identifier of the request",
"html_description": "<td>Identifier of the request</td>",
"rst_description": "Identifier of the request\n",
"name": "request_id",
"required": true
},
{
"type": "Integer",
"description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.",
"html_description": "<td>Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.</td>",
"rst_description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.\n",
"name": "user_id",
"required": true
}
],
"category": "types"
},
{
"anchor": "chatshared",
"name": "ChatShared",
"description": "This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.",
"html_description": "<p>This object contains information about the chat whose identifier was shared with the bot using a <a href=\"#keyboardbuttonrequestchat\">KeyboardButtonRequestChat</a> button.</p>",
"rst_description": "This object contains information about the chat whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.",
"annotations": [
{
"type": "Integer",
"description": "Identifier of the request",
"html_description": "<td>Identifier of the request</td>",
"rst_description": "Identifier of the request\n",
"name": "request_id",
"required": true
},
{
"type": "Integer",
"description": "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.",
"html_description": "<td>Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.</td>",
"rst_description": "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.\n",
"name": "chat_id",
"required": true
}
],
"category": "types"
},
{
"anchor": "writeaccessallowed",
"name": "WriteAccessAllowed",
@ -2569,9 +2637,9 @@
{
"anchor": "keyboardbutton",
"name": "KeyboardButton",
"description": "This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.\nNote: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.\nNote: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.\nNote: web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.",
"html_description": "<p>This object represents one button of the reply keyboard. For simple text buttons <em>String</em> can be used instead of this object to specify text of the button. Optional fields <em>web_app</em>, <em>request_contact</em>, <em>request_location</em>, and <em>request_poll</em> are mutually exclusive.</p><p><strong>Note:</strong> <em>request_contact</em> and <em>request_location</em> options will only work in Telegram versions released after 9 April, 2016. Older clients will display <em>unsupported message</em>.<br/>\n<strong>Note:</strong> <em>request_poll</em> option will only work in Telegram versions released after 23 January, 2020. Older clients will display <em>unsupported message</em>.<br/>\n<strong>Note:</strong> <em>web_app</em> option will only work in Telegram versions released after 16 April, 2022. Older clients will display <em>unsupported message</em>.</p>",
"rst_description": "This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields *web_app*, *request_contact*, *request_location*, and *request_poll* are mutually exclusive.\n**Note:** *request_contact* and *request_location* options will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*.\n\n**Note:** *request_poll* option will only work in Telegram versions released after 23 January, 2020. Older clients will display *unsupported message*.\n\n**Note:** *web_app* option will only work in Telegram versions released after 16 April, 2022. Older clients will display *unsupported message*.",
"description": "This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_user, request_chat, request_contact, request_location, and request_poll are mutually exclusive.\nNote: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.\nNote: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.\nNote: web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.\nNote: request_user and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.",
"html_description": "<p>This object represents one button of the reply keyboard. For simple text buttons, <em>String</em> can be used instead of this object to specify the button text. The optional fields <em>web_app</em>, <em>request_user</em>, <em>request_chat</em>, <em>request_contact</em>, <em>request_location</em>, and <em>request_poll</em> are mutually exclusive.</p><p><strong>Note:</strong> <em>request_contact</em> and <em>request_location</em> options will only work in Telegram versions released after 9 April, 2016. Older clients will display <em>unsupported message</em>.<br/>\n<strong>Note:</strong> <em>request_poll</em> option will only work in Telegram versions released after 23 January, 2020. Older clients will display <em>unsupported message</em>.<br/>\n<strong>Note:</strong> <em>web_app</em> option will only work in Telegram versions released after 16 April, 2022. Older clients will display <em>unsupported message</em>.<br/>\n<strong>Note:</strong> <em>request_user</em> and <em>request_chat</em> options will only work in Telegram versions released after 3 February, 2023. Older clients will display <em>unsupported message</em>.</p>",
"rst_description": "This object represents one button of the reply keyboard. For simple text buttons, *String* can be used instead of this object to specify the button text. The optional fields *web_app*, *request_user*, *request_chat*, *request_contact*, *request_location*, and *request_poll* are mutually exclusive.\n**Note:** *request_contact* and *request_location* options will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*.\n\n**Note:** *request_poll* option will only work in Telegram versions released after 23 January, 2020. Older clients will display *unsupported message*.\n\n**Note:** *web_app* option will only work in Telegram versions released after 16 April, 2022. Older clients will display *unsupported message*.\n\n**Note:** *request_user* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*.",
"annotations": [
{
"type": "String",
@ -2581,6 +2649,22 @@
"name": "text",
"required": true
},
{
"type": "KeyboardButtonRequestUser",
"description": "If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only.",
"html_description": "<td><em>Optional.</em> If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a &#8220;user_shared&#8221; service message. Available in private chats only.</td>",
"rst_description": "*Optional.* If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only.\n",
"name": "request_user",
"required": false
},
{
"type": "KeyboardButtonRequestChat",
"description": "If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.",
"html_description": "<td><em>Optional.</em> If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a &#8220;chat_shared&#8221; service message. Available in private chats only.</td>",
"rst_description": "*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n",
"name": "request_chat",
"required": false
},
{
"type": "Boolean",
"description": "If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.",
@ -2616,6 +2700,114 @@
],
"category": "types"
},
{
"anchor": "keyboardbuttonrequestuser",
"name": "KeyboardButtonRequestUser",
"description": "This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.",
"html_description": "<p>This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.</p>",
"rst_description": "This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.",
"annotations": [
{
"type": "Integer",
"description": "Signed 32-bit identifier of the request",
"html_description": "<td>Signed 32-bit identifier of the request</td>",
"rst_description": "Signed 32-bit identifier of the request\n",
"name": "request_id",
"required": true
},
{
"type": "Boolean",
"description": "Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request a bot, pass <em>False</em> to request a regular user. If not specified, no additional restrictions are applied.</td>",
"rst_description": "*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to request a regular user. If not specified, no additional restrictions are applied.\n",
"name": "user_is_bot",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request a premium user, pass <em>False</em> to request a non-premium user. If not specified, no additional restrictions are applied.</td>",
"rst_description": "*Optional*. Pass :code:`True` to request a premium user, pass :code:`False` to request a non-premium user. If not specified, no additional restrictions are applied.\n",
"name": "user_is_premium",
"required": false
}
],
"category": "types"
},
{
"anchor": "keyboardbuttonrequestchat",
"name": "KeyboardButtonRequestChat",
"description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.",
"html_description": "<p>This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.</p>",
"rst_description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.",
"annotations": [
{
"type": "Integer",
"description": "Signed 32-bit identifier of the request",
"html_description": "<td>Signed 32-bit identifier of the request</td>",
"rst_description": "Signed 32-bit identifier of the request\n",
"name": "request_id",
"required": true
},
{
"type": "Boolean",
"description": "Pass True to request a channel chat, pass False to request a group or a supergroup chat.",
"html_description": "<td>Pass <em>True</em> to request a channel chat, pass <em>False</em> to request a group or a supergroup chat.</td>",
"rst_description": "Pass :code:`True` to request a channel chat, pass :code:`False` to request a group or a supergroup chat.\n",
"name": "chat_is_channel",
"required": true
},
{
"type": "Boolean",
"description": "Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied.",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request a forum supergroup, pass <em>False</em> to request a non-forum chat. If not specified, no additional restrictions are applied.</td>",
"rst_description": "*Optional*. Pass :code:`True` to request a forum supergroup, pass :code:`False` to request a non-forum chat. If not specified, no additional restrictions are applied.\n",
"name": "chat_is_forum",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied.",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request a supergroup or a channel with a username, pass <em>False</em> to request a chat without a username. If not specified, no additional restrictions are applied.</td>",
"rst_description": "*Optional*. Pass :code:`True` to request a supergroup or a channel with a username, pass :code:`False` to request a chat without a username. If not specified, no additional restrictions are applied.\n",
"name": "chat_has_username",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request a chat owned by the user. Otherwise, no additional restrictions are applied.</td>",
"rst_description": "*Optional*. Pass :code:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied.\n",
"name": "chat_is_created",
"required": false
},
{
"type": "ChatAdministratorRights",
"description": "A JSON-serialized object listing the required administrator rights of the user in the chat. If not specified, no additional restrictions are applied.",
"html_description": "<td><em>Optional</em>. A JSON-serialized object listing the required administrator rights of the user in the chat. If not specified, no additional restrictions are applied.</td>",
"rst_description": "*Optional*. A JSON-serialized object listing the required administrator rights of the user in the chat. If not specified, no additional restrictions are applied.\n",
"name": "user_administrator_rights",
"required": false
},
{
"type": "ChatAdministratorRights",
"description": "A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.",
"html_description": "<td><em>Optional</em>. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of <em>user_administrator_rights</em>. If not specified, no additional restrictions are applied.</td>",
"rst_description": "*Optional*. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of *user_administrator_rights*. If not specified, no additional restrictions are applied.\n",
"name": "bot_administrator_rights",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.</td>",
"rst_description": "*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.\n",
"name": "bot_is_member",
"required": false
}
],
"category": "types"
},
{
"anchor": "keyboardbuttonpolltype",
"name": "KeyboardButtonPollType",
@ -3075,9 +3267,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)",
"html_description": "<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>",
"rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n",
"description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)",
"html_description": "<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>",
"rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n",
"name": "can_promote_members",
"required": true
},
@ -3256,9 +3448,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)",
"html_description": "<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>",
"rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n",
"description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)",
"html_description": "<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>",
"rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n",
"name": "can_promote_members",
"required": true
},
@ -3378,6 +3570,86 @@
"name": "is_member",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues",
"html_description": "<td><em>True</em>, if the user is allowed to send text messages, contacts, invoices, locations and venues</td>",
"rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues\n",
"name": "can_send_messages",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send audios",
"html_description": "<td><em>True</em>, if the user is allowed to send audios</td>",
"rst_description": ":code:`True`, if the user is allowed to send audios\n",
"name": "can_send_audios",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send documents",
"html_description": "<td><em>True</em>, if the user is allowed to send documents</td>",
"rst_description": ":code:`True`, if the user is allowed to send documents\n",
"name": "can_send_documents",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send photos",
"html_description": "<td><em>True</em>, if the user is allowed to send photos</td>",
"rst_description": ":code:`True`, if the user is allowed to send photos\n",
"name": "can_send_photos",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send videos",
"html_description": "<td><em>True</em>, if the user is allowed to send videos</td>",
"rst_description": ":code:`True`, if the user is allowed to send videos\n",
"name": "can_send_videos",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send video notes",
"html_description": "<td><em>True</em>, if the user is allowed to send video notes</td>",
"rst_description": ":code:`True`, if the user is allowed to send video notes\n",
"name": "can_send_video_notes",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send voice notes",
"html_description": "<td><em>True</em>, if the user is allowed to send voice notes</td>",
"rst_description": ":code:`True`, if the user is allowed to send voice notes\n",
"name": "can_send_voice_notes",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send polls",
"html_description": "<td><em>True</em>, if the user is allowed to send polls</td>",
"rst_description": ":code:`True`, if the user is allowed to send polls\n",
"name": "can_send_polls",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send animations, games, stickers and use inline bots",
"html_description": "<td><em>True</em>, if the user is allowed to send animations, games, stickers and use inline bots</td>",
"rst_description": ":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n",
"name": "can_send_other_messages",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to add web page previews to their messages",
"html_description": "<td><em>True</em>, if the user is allowed to add web page previews to their messages</td>",
"rst_description": ":code:`True`, if the user is allowed to add web page previews to their messages\n",
"name": "can_add_web_page_previews",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to change the chat title, photo and other settings",
@ -3410,46 +3682,6 @@
"name": "can_manage_topics",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send text messages, contacts, locations and venues",
"html_description": "<td><em>True</em>, if the user is allowed to send text messages, contacts, locations and venues</td>",
"rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, locations and venues\n",
"name": "can_send_messages",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes",
"html_description": "<td><em>True</em>, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes</td>",
"rst_description": ":code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes\n",
"name": "can_send_media_messages",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send polls",
"html_description": "<td><em>True</em>, if the user is allowed to send polls</td>",
"rst_description": ":code:`True`, if the user is allowed to send polls\n",
"name": "can_send_polls",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send animations, games, stickers and use inline bots",
"html_description": "<td><em>True</em>, if the user is allowed to send animations, games, stickers and use inline bots</td>",
"rst_description": ":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n",
"name": "can_send_other_messages",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to add web page previews to their messages",
"html_description": "<td><em>True</em>, if the user is allowed to add web page previews to their messages</td>",
"rst_description": ":code:`True`, if the user is allowed to add web page previews to their messages\n",
"name": "can_add_web_page_previews",
"required": true
},
{
"type": "Integer",
"description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever",
@ -3602,6 +3834,14 @@
"name": "from",
"required": true
},
{
"type": "Integer",
"description": "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.",
"html_description": "<td>Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.</td>",
"rst_description": "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.\n",
"name": "user_chat_id",
"required": true
},
{
"type": "Integer",
"description": "Date the request was sent in Unix time",
@ -3638,41 +3878,81 @@
"annotations": [
{
"type": "Boolean",
"description": "True, if the user is allowed to send text messages, contacts, locations and venues",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send text messages, contacts, locations and venues</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, locations and venues\n",
"description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send text messages, contacts, invoices, locations and venues</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues\n",
"name": "can_send_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages\n",
"name": "can_send_media_messages",
"description": "True, if the user is allowed to send audios",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send audios</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send audios\n",
"name": "can_send_audios",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send polls, implies can_send_messages",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send polls, implies can_send_messages</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls, implies can_send_messages\n",
"description": "True, if the user is allowed to send documents",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send documents</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send documents\n",
"name": "can_send_documents",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send photos",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send photos</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send photos\n",
"name": "can_send_photos",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send videos",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send videos</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send videos\n",
"name": "can_send_videos",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send video notes",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send video notes</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send video notes\n",
"name": "can_send_video_notes",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send voice notes",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send voice notes</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send voice notes\n",
"name": "can_send_voice_notes",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send polls",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send polls</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls\n",
"name": "can_send_polls",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages\n",
"description": "True, if the user is allowed to send animations, games, stickers and use inline bots",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send animations, games, stickers and use inline bots</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n",
"name": "can_send_other_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to add web page previews to their messages, implies can_send_media_messages</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages, implies can_send_media_messages\n",
"description": "True, if the user is allowed to add web page previews to their messages",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to add web page previews to their messages</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages\n",
"name": "can_add_web_page_previews",
"required": false
},
@ -6584,6 +6864,14 @@
"rst_description": "A JSON-serialized object for new user permissions\n",
"name": "permissions"
},
{
"type": "Boolean",
"required": false,
"description": "Pass 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.",
"html_description": "<td>Pass <em>True</em> if chat permissions are set independently. Otherwise, the <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> permissions will imply the <em>can_send_messages</em>, <em>can_send_audios</em>, <em>can_send_documents</em>, <em>can_send_photos</em>, <em>can_send_videos</em>, <em>can_send_video_notes</em>, and <em>can_send_voice_notes</em> permissions; the <em>can_send_polls</em> permission will imply the <em>can_send_messages</em> permission.</td>",
"rst_description": "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.\n",
"name": "use_independent_chat_permissions"
},
{
"type": "Integer",
"required": false,
@ -6677,9 +6965,9 @@
{
"type": "Boolean",
"required": false,
"description": "Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)",
"html_description": "<td>Pass <em>True</em> if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)</td>",
"rst_description": "Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)\n",
"description": "Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)",
"html_description": "<td>Pass <em>True</em> if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)</td>",
"rst_description": "Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)\n",
"name": "can_promote_members"
},
{
@ -6825,6 +7113,14 @@
"html_description": "<td>A JSON-serialized object for new default chat permissions</td>",
"rst_description": "A JSON-serialized object for new default chat permissions\n",
"name": "permissions"
},
{
"type": "Boolean",
"required": false,
"description": "Pass 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.",
"html_description": "<td>Pass <em>True</em> if chat permissions are set independently. Otherwise, the <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> permissions will imply the <em>can_send_messages</em>, <em>can_send_audios</em>, <em>can_send_documents</em>, <em>can_send_photos</em>, <em>can_send_videos</em>, <em>can_send_video_notes</em>, and <em>can_send_voice_notes</em> permissions; the <em>can_send_polls</em> permission will imply the <em>can_send_messages</em> permission.</td>",
"rst_description": "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.\n",
"name": "use_independent_chat_permissions"
}
],
"category": "methods"

View file

@ -55,9 +55,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)",
"html_description": "<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>",
"rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n",
"description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)",
"html_description": "<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>",
"rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n",
"name": "can_promote_members",
"required": true
},

View file

@ -29,6 +29,14 @@
"name": "from",
"required": true
},
{
"type": "Integer",
"description": "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.",
"html_description": "<td>Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.</td>",
"rst_description": "Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.\n",
"name": "user_chat_id",
"required": true
},
{
"type": "Integer",
"description": "Date the request was sent in Unix time",

View file

@ -79,9 +79,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)",
"html_description": "<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>",
"rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n",
"description": "True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)",
"html_description": "<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>",
"rst_description": ":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)\n",
"name": "can_promote_members",
"required": true
},

View file

@ -37,6 +37,86 @@
"name": "is_member",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues",
"html_description": "<td><em>True</em>, if the user is allowed to send text messages, contacts, invoices, locations and venues</td>",
"rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues\n",
"name": "can_send_messages",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send audios",
"html_description": "<td><em>True</em>, if the user is allowed to send audios</td>",
"rst_description": ":code:`True`, if the user is allowed to send audios\n",
"name": "can_send_audios",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send documents",
"html_description": "<td><em>True</em>, if the user is allowed to send documents</td>",
"rst_description": ":code:`True`, if the user is allowed to send documents\n",
"name": "can_send_documents",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send photos",
"html_description": "<td><em>True</em>, if the user is allowed to send photos</td>",
"rst_description": ":code:`True`, if the user is allowed to send photos\n",
"name": "can_send_photos",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send videos",
"html_description": "<td><em>True</em>, if the user is allowed to send videos</td>",
"rst_description": ":code:`True`, if the user is allowed to send videos\n",
"name": "can_send_videos",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send video notes",
"html_description": "<td><em>True</em>, if the user is allowed to send video notes</td>",
"rst_description": ":code:`True`, if the user is allowed to send video notes\n",
"name": "can_send_video_notes",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send voice notes",
"html_description": "<td><em>True</em>, if the user is allowed to send voice notes</td>",
"rst_description": ":code:`True`, if the user is allowed to send voice notes\n",
"name": "can_send_voice_notes",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send polls",
"html_description": "<td><em>True</em>, if the user is allowed to send polls</td>",
"rst_description": ":code:`True`, if the user is allowed to send polls\n",
"name": "can_send_polls",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send animations, games, stickers and use inline bots",
"html_description": "<td><em>True</em>, if the user is allowed to send animations, games, stickers and use inline bots</td>",
"rst_description": ":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n",
"name": "can_send_other_messages",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to add web page previews to their messages",
"html_description": "<td><em>True</em>, if the user is allowed to add web page previews to their messages</td>",
"rst_description": ":code:`True`, if the user is allowed to add web page previews to their messages\n",
"name": "can_add_web_page_previews",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to change the chat title, photo and other settings",
@ -69,46 +149,6 @@
"name": "can_manage_topics",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send text messages, contacts, locations and venues",
"html_description": "<td><em>True</em>, if the user is allowed to send text messages, contacts, locations and venues</td>",
"rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, locations and venues\n",
"name": "can_send_messages",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes",
"html_description": "<td><em>True</em>, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes</td>",
"rst_description": ":code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes\n",
"name": "can_send_media_messages",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send polls",
"html_description": "<td><em>True</em>, if the user is allowed to send polls</td>",
"rst_description": ":code:`True`, if the user is allowed to send polls\n",
"name": "can_send_polls",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send animations, games, stickers and use inline bots",
"html_description": "<td><em>True</em>, if the user is allowed to send animations, games, stickers and use inline bots</td>",
"rst_description": ":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n",
"name": "can_send_other_messages",
"required": true
},
{
"type": "Boolean",
"description": "True, if the user is allowed to add web page previews to their messages",
"html_description": "<td><em>True</em>, if the user is allowed to add web page previews to their messages</td>",
"rst_description": ":code:`True`, if the user is allowed to add web page previews to their messages\n",
"name": "can_add_web_page_previews",
"required": true
},
{
"type": "Integer",
"description": "Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever",

View file

@ -15,41 +15,81 @@
"annotations": [
{
"type": "Boolean",
"description": "True, if the user is allowed to send text messages, contacts, locations and venues",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send text messages, contacts, locations and venues</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, locations and venues\n",
"description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send text messages, contacts, invoices, locations and venues</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues\n",
"name": "can_send_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages\n",
"name": "can_send_media_messages",
"description": "True, if the user is allowed to send audios",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send audios</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send audios\n",
"name": "can_send_audios",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send polls, implies can_send_messages",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send polls, implies can_send_messages</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls, implies can_send_messages\n",
"description": "True, if the user is allowed to send documents",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send documents</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send documents\n",
"name": "can_send_documents",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send photos",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send photos</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send photos\n",
"name": "can_send_photos",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send videos",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send videos</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send videos\n",
"name": "can_send_videos",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send video notes",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send video notes</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send video notes\n",
"name": "can_send_video_notes",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send voice notes",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send voice notes</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send voice notes\n",
"name": "can_send_voice_notes",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send polls",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send polls</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send polls\n",
"name": "can_send_polls",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages\n",
"description": "True, if the user is allowed to send animations, games, stickers and use inline bots",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send animations, games, stickers and use inline bots</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots\n",
"name": "can_send_other_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to add web page previews to their messages, implies can_send_media_messages</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages, implies can_send_media_messages\n",
"description": "True, if the user is allowed to add web page previews to their messages",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to add web page previews to their messages</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages\n",
"name": "can_add_web_page_previews",
"required": false
},

View file

@ -9,9 +9,9 @@
"object": {
"anchor": "keyboardbutton",
"name": "KeyboardButton",
"description": "This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.\nNote: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.\nNote: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.\nNote: web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.",
"html_description": "<p>This object represents one button of the reply keyboard. For simple text buttons <em>String</em> can be used instead of this object to specify text of the button. Optional fields <em>web_app</em>, <em>request_contact</em>, <em>request_location</em>, and <em>request_poll</em> are mutually exclusive.</p><p><strong>Note:</strong> <em>request_contact</em> and <em>request_location</em> options will only work in Telegram versions released after 9 April, 2016. Older clients will display <em>unsupported message</em>.<br/>\n<strong>Note:</strong> <em>request_poll</em> option will only work in Telegram versions released after 23 January, 2020. Older clients will display <em>unsupported message</em>.<br/>\n<strong>Note:</strong> <em>web_app</em> option will only work in Telegram versions released after 16 April, 2022. Older clients will display <em>unsupported message</em>.</p>",
"rst_description": "This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields *web_app*, *request_contact*, *request_location*, and *request_poll* are mutually exclusive.\n**Note:** *request_contact* and *request_location* options will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*.\n\n**Note:** *request_poll* option will only work in Telegram versions released after 23 January, 2020. Older clients will display *unsupported message*.\n\n**Note:** *web_app* option will only work in Telegram versions released after 16 April, 2022. Older clients will display *unsupported message*.",
"description": "This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_user, request_chat, request_contact, request_location, and request_poll are mutually exclusive.\nNote: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.\nNote: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.\nNote: web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.\nNote: request_user and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.",
"html_description": "<p>This object represents one button of the reply keyboard. For simple text buttons, <em>String</em> can be used instead of this object to specify the button text. The optional fields <em>web_app</em>, <em>request_user</em>, <em>request_chat</em>, <em>request_contact</em>, <em>request_location</em>, and <em>request_poll</em> are mutually exclusive.</p><p><strong>Note:</strong> <em>request_contact</em> and <em>request_location</em> options will only work in Telegram versions released after 9 April, 2016. Older clients will display <em>unsupported message</em>.<br/>\n<strong>Note:</strong> <em>request_poll</em> option will only work in Telegram versions released after 23 January, 2020. Older clients will display <em>unsupported message</em>.<br/>\n<strong>Note:</strong> <em>web_app</em> option will only work in Telegram versions released after 16 April, 2022. Older clients will display <em>unsupported message</em>.<br/>\n<strong>Note:</strong> <em>request_user</em> and <em>request_chat</em> options will only work in Telegram versions released after 3 February, 2023. Older clients will display <em>unsupported message</em>.</p>",
"rst_description": "This object represents one button of the reply keyboard. For simple text buttons, *String* can be used instead of this object to specify the button text. The optional fields *web_app*, *request_user*, *request_chat*, *request_contact*, *request_location*, and *request_poll* are mutually exclusive.\n**Note:** *request_contact* and *request_location* options will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*.\n\n**Note:** *request_poll* option will only work in Telegram versions released after 23 January, 2020. Older clients will display *unsupported message*.\n\n**Note:** *web_app* option will only work in Telegram versions released after 16 April, 2022. Older clients will display *unsupported message*.\n\n**Note:** *request_user* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*.",
"annotations": [
{
"type": "String",
@ -21,6 +21,22 @@
"name": "text",
"required": true
},
{
"type": "KeyboardButtonRequestUser",
"description": "If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only.",
"html_description": "<td><em>Optional.</em> If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a &#8220;user_shared&#8221; service message. Available in private chats only.</td>",
"rst_description": "*Optional.* If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only.\n",
"name": "request_user",
"required": false
},
{
"type": "KeyboardButtonRequestChat",
"description": "If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.",
"html_description": "<td><em>Optional.</em> If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a &#8220;chat_shared&#8221; service message. Available in private chats only.</td>",
"rst_description": "*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.\n",
"name": "request_chat",
"required": false
},
{
"type": "Boolean",
"description": "If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.",

View file

@ -437,6 +437,22 @@
"name": "successful_payment",
"required": false
},
{
"type": "UserShared",
"description": "Service message: a user was shared with the bot",
"html_description": "<td><em>Optional</em>. Service message: a user was shared with the bot</td>",
"rst_description": "*Optional*. Service message: a user was shared with the bot\n",
"name": "user_shared",
"required": false
},
{
"type": "ChatShared",
"description": "Service message: a chat was shared with the bot",
"html_description": "<td><em>Optional</em>. Service message: a chat was shared with the bot</td>",
"rst_description": "*Optional*. Service message: a chat was shared with the bot\n",
"name": "chat_shared",
"required": false
},
{
"type": "String",
"description": "The domain name of the website on which the user has logged in.",

File diff suppressed because one or more lines are too long

View file

@ -38,6 +38,8 @@ class ContentType(str, Enum):
PINNED_MESSAGE = "pinned_message"
INVOICE = "invoice"
SUCCESSFUL_PAYMENT = "successful_payment"
USER_SHARED = "user_shared"
CHAT_SHARED = "chat_shared"
CONNECTED_WEBSITE = "connected_website"
WRITE_ACCESS_ALLOWED = "write_access_allowed"
PASSPORT_DATA = "passport_data"

View file

@ -36,7 +36,7 @@ class PromoteChatMember(TelegramMethod[bool]):
can_restrict_members: Optional[bool] = None
"""Pass :code:`True` if the administrator can restrict, ban or unban chat members"""
can_promote_members: Optional[bool] = None
"""Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)"""
"""Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)"""
can_change_info: Optional[bool] = None
"""Pass :code:`True` if the administrator can change chat title, photo and other settings"""
can_invite_users: Optional[bool] = None

View file

@ -25,6 +25,8 @@ class RestrictChatMember(TelegramMethod[bool]):
"""Unique identifier of the target user"""
permissions: ChatPermissions
"""A JSON-serialized object for new user permissions"""
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"""

View file

@ -1,6 +1,6 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Dict, Union
from typing import TYPE_CHECKING, Any, Dict, Union, Optional
from ..types import ChatPermissions
from .base import Request, TelegramMethod
@ -22,6 +22,8 @@ class SetChatPermissions(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
permissions: ChatPermissions
"""A JSON-serialized object for new default chat permissions"""
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."""
def build_request(self, bot: Bot) -> Request:
data: Dict[str, Any] = self.dict()

View file

@ -148,6 +148,10 @@ from .web_app_data import WebAppData
from .web_app_info import WebAppInfo
from .webhook_info import WebhookInfo
from .write_access_allowed import WriteAccessAllowed
from .chat_shared import ChatShared
from .keyboard_button_request_chat import KeyboardButtonRequestChat
from .keyboard_button_request_user import KeyboardButtonRequestUser
from .user_shared import UserShared
__all__ = (
"Animation",
@ -179,6 +183,7 @@ __all__ = (
"ChatMemberUpdated",
"ChatPermissions",
"ChatPhoto",
"ChatShared",
"ChosenInlineResult",
"Contact",
"ContentType",
@ -240,6 +245,8 @@ __all__ = (
"Invoice",
"KeyboardButton",
"KeyboardButtonPollType",
"KeyboardButtonRequestChat",
"KeyboardButtonRequestUser",
"LabeledPrice",
"Location",
"LoginUrl",
@ -287,6 +294,7 @@ __all__ = (
"Update",
"User",
"UserProfilePhotos",
"UserShared",
"Venue",
"Video",
"VideoChatEnded",

View file

@ -698,6 +698,7 @@ class Chat(TelegramObject):
def set_permissions(
self,
permissions: ChatPermissions,
use_independent_chat_permissions: Optional[bool] = None,
**kwargs: Any,
) -> SetChatPermissions:
"""
@ -711,6 +712,7 @@ class Chat(TelegramObject):
Source: https://core.telegram.org/bots/api#setchatpermissions
:param permissions: A JSON-serialized object for new default chat 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.
:return: instance of method :class:`aiogram.methods.set_chat_permissions.SetChatPermissions`
"""
# DO NOT EDIT MANUALLY!!!
@ -721,6 +723,7 @@ class Chat(TelegramObject):
return SetChatPermissions(
chat_id=self.id,
permissions=permissions,
use_independent_chat_permissions=use_independent_chat_permissions,
**kwargs,
)
@ -759,7 +762,7 @@ class Chat(TelegramObject):
:param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users
:param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats
:param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members
:param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)
:param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)
:param can_change_info: Pass :code:`True` if the administrator can change chat title, photo and other settings
:param can_invite_users: Pass :code:`True` if the administrator can invite new users to the chat
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages, supergroups only
@ -793,6 +796,7 @@ class Chat(TelegramObject):
self,
user_id: int,
permissions: ChatPermissions,
use_independent_chat_permissions: Optional[bool] = None,
until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
**kwargs: Any,
) -> RestrictChatMember:
@ -808,6 +812,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
:return: instance of method :class:`aiogram.methods.restrict_chat_member.RestrictChatMember`
"""
@ -820,6 +825,7 @@ class Chat(TelegramObject):
chat_id=self.id,
user_id=user_id,
permissions=permissions,
use_independent_chat_permissions=use_independent_chat_permissions,
until_date=until_date,
**kwargs,
)

View file

@ -26,7 +26,7 @@ class ChatAdministratorRights(TelegramObject):
can_restrict_members: bool
""":code:`True`, if the administrator can restrict, ban or unban chat members"""
can_promote_members: bool
""":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)"""
""":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"""
can_change_info: bool
""":code:`True`, if the user is allowed to change the chat title, photo and other settings"""
can_invite_users: bool

View file

@ -27,6 +27,8 @@ class ChatJoinRequest(TelegramObject):
"""Chat to which the request was sent"""
from_user: User = Field(..., alias="from")
"""User that sent the join request"""
user_chat_id: int
"""Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user."""
date: datetime.datetime
"""Date the request was sent in Unix time"""
bio: Optional[str] = None

View file

@ -42,7 +42,7 @@ class ChatMember(TelegramObject):
can_restrict_members: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can restrict, ban or unban chat members"""
can_promote_members: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)"""
"""*Optional*. :code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"""
can_change_info: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings"""
can_invite_users: Optional[bool] = None
@ -58,9 +58,19 @@ class ChatMember(TelegramObject):
is_member: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is a member of the chat at the moment of the request"""
can_send_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, locations and venues"""
can_send_media_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes"""
"""*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues"""
can_send_audios: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send audios"""
can_send_documents: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send documents"""
can_send_photos: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send photos"""
can_send_videos: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send videos"""
can_send_video_notes: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send video notes"""
can_send_voice_notes: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send voice notes"""
can_send_polls: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send polls"""
can_send_other_messages: Optional[bool] = None

View file

@ -35,7 +35,7 @@ class ChatMemberAdministrator(ChatMember):
can_restrict_members: bool
""":code:`True`, if the administrator can restrict, ban or unban chat members"""
can_promote_members: bool
""":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)"""
""":code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)"""
can_change_info: bool
""":code:`True`, if the user is allowed to change the chat title, photo and other settings"""
can_invite_users: bool

View file

@ -25,6 +25,26 @@ class ChatMemberRestricted(ChatMember):
"""Information about the user"""
is_member: bool
""":code:`True`, if the user is a member of the chat at the moment of the request"""
can_send_messages: bool
""":code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues"""
can_send_audios: bool
""":code:`True`, if the user is allowed to send audios"""
can_send_documents: bool
""":code:`True`, if the user is allowed to send documents"""
can_send_photos: bool
""":code:`True`, if the user is allowed to send photos"""
can_send_videos: bool
""":code:`True`, if the user is allowed to send videos"""
can_send_video_notes: bool
""":code:`True`, if the user is allowed to send video notes"""
can_send_voice_notes: bool
""":code:`True`, if the user is allowed to send voice notes"""
can_send_polls: bool
""":code:`True`, if the user is allowed to send polls"""
can_send_other_messages: bool
""":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots"""
can_add_web_page_previews: bool
""":code:`True`, if the user is allowed to add web page previews to their messages"""
can_change_info: bool
""":code:`True`, if the user is allowed to change the chat title, photo and other settings"""
can_invite_users: bool
@ -33,15 +53,5 @@ class ChatMemberRestricted(ChatMember):
""":code:`True`, if the user is allowed to pin messages"""
can_manage_topics: bool
""":code:`True`, if the user is allowed to create forum topics"""
can_send_messages: bool
""":code:`True`, if the user is allowed to send text messages, contacts, locations and venues"""
can_send_media_messages: bool
""":code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes"""
can_send_polls: bool
""":code:`True`, if the user is allowed to send polls"""
can_send_other_messages: bool
""":code:`True`, if the user is allowed to send animations, games, stickers and use inline bots"""
can_add_web_page_previews: bool
""":code:`True`, if the user is allowed to add web page previews to their messages"""
until_date: datetime.datetime
"""Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever"""

View file

@ -13,15 +13,25 @@ class ChatPermissions(MutableTelegramObject):
"""
can_send_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, locations and venues"""
can_send_media_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages"""
"""*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, invoices, locations and venues"""
can_send_audios: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send audios"""
can_send_documents: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send documents"""
can_send_photos: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send photos"""
can_send_videos: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send videos"""
can_send_video_notes: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send video notes"""
can_send_voice_notes: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send voice notes"""
can_send_polls: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send polls, implies can_send_messages"""
"""*Optional*. :code:`True`, if the user is allowed to send polls"""
can_send_other_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages"""
"""*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots"""
can_add_web_page_previews: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages, implies can_send_media_messages"""
"""*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages"""
can_change_info: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups"""
can_invite_users: Optional[bool] = None

View file

@ -6,23 +6,31 @@ from .base import MutableTelegramObject
if TYPE_CHECKING:
from .keyboard_button_poll_type import KeyboardButtonPollType
from .keyboard_button_request_chat import KeyboardButtonRequestChat
from .keyboard_button_request_user import KeyboardButtonRequestUser
from .web_app_info import WebAppInfo
class KeyboardButton(MutableTelegramObject):
"""
This object represents one button of the reply keyboard. For simple text buttons *String* can be used instead of this object to specify text of the button. Optional fields *web_app*, *request_contact*, *request_location*, and *request_poll* are mutually exclusive.
This object represents one button of the reply keyboard. For simple text buttons, *String* can be used instead of this object to specify the button text. The optional fields *web_app*, *request_user*, *request_chat*, *request_contact*, *request_location*, and *request_poll* are mutually exclusive.
**Note:** *request_contact* and *request_location* options will only work in Telegram versions released after 9 April, 2016. Older clients will display *unsupported message*.
**Note:** *request_poll* option will only work in Telegram versions released after 23 January, 2020. Older clients will display *unsupported message*.
**Note:** *web_app* option will only work in Telegram versions released after 16 April, 2022. Older clients will display *unsupported message*.
**Note:** *request_user* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*.
Source: https://core.telegram.org/bots/api#keyboardbutton
"""
text: str
"""Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed"""
request_user: Optional[KeyboardButtonRequestUser] = None
"""*Optional.* If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only."""
request_chat: Optional[KeyboardButtonRequestChat] = None
"""*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only."""
request_contact: Optional[bool] = None
"""*Optional*. If :code:`True`, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only."""
request_location: Optional[bool] = None

View file

@ -90,6 +90,8 @@ if TYPE_CHECKING:
from .voice import Voice
from .web_app_data import WebAppData
from .write_access_allowed import WriteAccessAllowed
from .chat_shared import ChatShared
from .user_shared import UserShared
class Message(TelegramObject):
@ -205,6 +207,10 @@ class Message(TelegramObject):
"""*Optional*. Message is an invoice for a `payment <https://core.telegram.org/bots/api#payments>`_, information about the invoice. `More about payments » <https://core.telegram.org/bots/api#payments>`_"""
successful_payment: Optional[SuccessfulPayment] = None
"""*Optional*. Message is a service message about a successful payment, information about the payment. `More about payments » <https://core.telegram.org/bots/api#payments>`_"""
user_shared: Optional[UserShared] = None
"""*Optional*. Service message: a user was shared with the bot"""
chat_shared: Optional[ChatShared] = None
"""*Optional*. Service message: a chat was shared with the bot"""
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

View file

@ -75,6 +75,7 @@ Available types
chat_member_updated
chat_permissions
chat_photo
chat_shared
contact
dice
document
@ -98,6 +99,8 @@ Available types
input_media_video
keyboard_button
keyboard_button_poll_type
keyboard_button_request_chat
keyboard_button_request_user
location
login_url
menu_button
@ -118,6 +121,7 @@ Available types
response_parameters
user
user_profile_photos
user_shared
venue
video
video_chat_ended