Added support for Bot API 6.9

This commit is contained in:
Alex Root Junior 2023-09-21 11:07:29 +03:00
parent 8a77939d5b
commit e7c39cfded
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
9 changed files with 210 additions and 44 deletions

View file

@ -1167,9 +1167,9 @@
},
{
"type": "WriteAccessAllowed",
"description": "Service message: the user allowed the bot added to the attachment menu to write messages",
"html_description": "<td><em>Optional</em>. Service message: the user allowed the bot added to the attachment menu to write messages</td>",
"rst_description": "*Optional*. Service message: the user allowed the bot added to the attachment menu to write messages\n",
"description": "Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess",
"html_description": "<td><em>Optional</em>. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a></td>",
"rst_description": "*Optional*. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"name": "write_access_allowed",
"required": false
},
@ -2460,11 +2460,27 @@
"annotations": [
{
"type": "String",
"description": "Name of the Web App which was launched from a link",
"html_description": "<td><em>Optional</em>. Name of the Web App which was launched from a link</td>",
"rst_description": "*Optional*. Name of the Web App which was launched from a link\n",
"description": "Name of the Web App, if the access was granted when the Web App was launched from a link",
"html_description": "<td><em>Optional</em>. Name of the Web App, if the access was granted when the Web App was launched from a link</td>",
"rst_description": "*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link\n",
"name": "web_app_name",
"required": false
},
{
"type": "Boolean",
"description": "True, if the access was granted when the bot was added to the attachment or side menu",
"html_description": "<td><em>Optional</em>. True, if the access was granted when the bot was added to the attachment or side menu</td>",
"rst_description": "*Optional*. True, if the access was granted when the bot was added to the attachment or side menu\n",
"name": "from_attachment_menu",
"required": false
},
{
"type": "Boolean",
"description": "True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess",
"html_description": "<td><em>Optional</em>. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a></td>",
"rst_description": "*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"name": "from_request",
"required": false
}
],
"category": "types"
@ -3335,9 +3351,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"description": "True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"name": "can_manage_chat",
"required": true
},
@ -3391,9 +3407,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n",
"description": "True, if the administrator can post messages in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only\n",
"name": "can_post_messages",
"required": false
},
@ -3420,6 +3436,30 @@
"rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only\n",
"name": "can_manage_topics",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can delete stories posted by other users",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can delete stories posted by other users</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can delete stories posted by other users\n",
"name": "can_delete_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can post stories in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post stories in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post stories in the channel; channels only\n",
"name": "can_post_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can edit stories posted by other users; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit stories posted by other users; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only\n",
"name": "can_edit_stories",
"required": false
}
],
"category": "types"
@ -3516,9 +3556,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"description": "True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"name": "can_manage_chat",
"required": true
},
@ -3572,9 +3612,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n",
"description": "True, if the administrator can post messages in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only\n",
"name": "can_post_messages",
"required": false
},
@ -3609,6 +3649,30 @@
"rst_description": "*Optional*. Custom title for this user\n",
"name": "custom_title",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can delete stories posted by other users",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can delete stories posted by other users</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can delete stories posted by other users\n",
"name": "can_delete_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can post stories in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post stories in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post stories in the channel; channels only\n",
"name": "can_post_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can edit stories posted by other users; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit stories posted by other users; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only\n",
"name": "can_edit_stories",
"required": false
}
],
"category": "types"

View file

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

View file

@ -45,9 +45,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"description": "True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege",
"html_description": "<td><em>True</em>, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege</td>",
"rst_description": ":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege\n",
"name": "can_manage_chat",
"required": true
},
@ -101,9 +101,9 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post in the channel; channels only\n",
"description": "True, if the administrator can post messages in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only\n",
"name": "can_post_messages",
"required": false
},
@ -138,6 +138,30 @@
"rst_description": "*Optional*. Custom title for this user\n",
"name": "custom_title",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can delete stories posted by other users",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can delete stories posted by other users</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can delete stories posted by other users\n",
"name": "can_delete_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can post stories in the channel; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post stories in the channel; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post stories in the channel; channels only\n",
"name": "can_post_stories",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can edit stories posted by other users; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit stories posted by other users; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only\n",
"name": "can_edit_stories",
"required": false
}
],
"category": "types"

View file

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

View file

@ -13,11 +13,27 @@
"annotations": [
{
"type": "String",
"description": "Name of the Web App which was launched from a link",
"html_description": "<td><em>Optional</em>. Name of the Web App which was launched from a link</td>",
"rst_description": "*Optional*. Name of the Web App which was launched from a link\n",
"description": "Name of the Web App, if the access was granted when the Web App was launched from a link",
"html_description": "<td><em>Optional</em>. Name of the Web App, if the access was granted when the Web App was launched from a link</td>",
"rst_description": "*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link\n",
"name": "web_app_name",
"required": false
},
{
"type": "Boolean",
"description": "True, if the access was granted when the bot was added to the attachment or side menu",
"html_description": "<td><em>Optional</em>. True, if the access was granted when the bot was added to the attachment or side menu</td>",
"rst_description": "*Optional*. True, if the access was granted when the bot was added to the attachment or side menu\n",
"name": "from_attachment_menu",
"required": false
},
{
"type": "Boolean",
"description": "True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess",
"html_description": "<td><em>Optional</em>. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method <a href=\"/bots/webapps#initializing-mini-apps\">requestWriteAccess</a></td>",
"rst_description": "*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_\n",
"name": "from_request",
"required": false
}
],
"category": "types"

View file

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

View file

@ -25,7 +25,7 @@ class ChatMemberAdministrator(ChatMember):
is_anonymous: bool
""":code:`True`, if the user's presence in the chat is hidden"""
can_manage_chat: bool
""":code:`True`, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"""
""":code:`True`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege"""
can_delete_messages: bool
""":code:`True`, if the administrator can delete messages of other users"""
can_manage_video_chats: bool
@ -39,7 +39,7 @@ class ChatMemberAdministrator(ChatMember):
can_invite_users: bool
""":code:`True`, if the user is allowed to invite new users to the chat"""
can_post_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post in the channel; channels only"""
"""*Optional*. :code:`True`, if the administrator can post messages in the channel; channels only"""
can_edit_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
can_pin_messages: Optional[bool] = None
@ -48,6 +48,12 @@ class ChatMemberAdministrator(ChatMember):
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""
custom_title: Optional[str] = None
"""*Optional*. Custom title for this user"""
can_delete_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can delete stories posted by other users"""
can_post_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post stories in the channel; channels only"""
can_edit_stories: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit stories posted by other users; channels only"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@ -72,6 +78,9 @@ class ChatMemberAdministrator(ChatMember):
can_pin_messages: Optional[bool] = None,
can_manage_topics: Optional[bool] = None,
custom_title: Optional[str] = None,
can_delete_stories: Optional[bool] = None,
can_post_stories: Optional[bool] = None,
can_edit_stories: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@ -95,5 +104,8 @@ class ChatMemberAdministrator(ChatMember):
can_pin_messages=can_pin_messages,
can_manage_topics=can_manage_topics,
custom_title=custom_title,
can_delete_stories=can_delete_stories,
can_post_stories=can_post_stories,
can_edit_stories=can_edit_stories,
**__pydantic_kwargs,
)

View file

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

View file

@ -11,17 +11,31 @@ class WriteAccessAllowed(TelegramObject):
"""
web_app_name: Optional[str] = None
"""*Optional*. Name of the Web App which was launched from a link"""
"""*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link"""
from_attachment_menu: Optional[bool] = None
"""*Optional*. True, if the access was granted when the bot was added to the attachment or side menu"""
from_request: Optional[bool] = None
"""*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, web_app_name: Optional[str] = None, **__pydantic_kwargs: Any
__pydantic__self__,
*,
web_app_name: Optional[str] = None,
from_attachment_menu: Optional[bool] = None,
from_request: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(web_app_name=web_app_name, **__pydantic_kwargs)
super().__init__(
web_app_name=web_app_name,
from_attachment_menu=from_attachment_menu,
from_request=from_request,
**__pydantic_kwargs,
)