Oops. Added lost files.

This commit is contained in:
Alex Root Junior 2023-02-04 02:00:10 +02:00
parent 968c478390
commit ddb4da34fd
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
12 changed files with 311 additions and 0 deletions

View file

@ -0,0 +1,35 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"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"
}
}

View file

@ -0,0 +1,83 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"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"
}
}

View file

@ -0,0 +1,43 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"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"
}
}

View file

@ -0,0 +1,35 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"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"
}
}

View file

@ -0,0 +1,14 @@
from aiogram.types import TelegramObject
class ChatShared(TelegramObject):
"""
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.
Source: https://core.telegram.org/bots/api#chatshared
"""
request_id: int
"""Identifier of the request"""
chat_id: int
"""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."""

View file

@ -0,0 +1,33 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Optional
from aiogram.types import TelegramObject
if TYPE_CHECKING:
from .chat_administrator_rights import ChatAdministratorRights
class KeyboardButtonRequestChat(TelegramObject):
"""
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.
Source: https://core.telegram.org/bots/api#keyboardbuttonrequestchat
"""
request_id: int
"""Signed 32-bit identifier of the request"""
chat_is_channel: bool
"""Pass :code:`True` to request a channel chat, pass :code:`False` to request a group or a supergroup chat."""
chat_is_forum: Optional[bool] = None
"""*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."""
chat_has_username: Optional[bool] = None
"""*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."""
chat_is_created: Optional[bool] = None
"""*Optional*. Pass :code:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied."""
user_administrator_rights: Optional[ChatAdministratorRights] = None
"""*Optional*. A JSON-serialized object listing the required administrator rights of the user in the chat. If not specified, no additional restrictions are applied."""
bot_administrator_rights: Optional[ChatAdministratorRights] = None
"""*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."""
bot_is_member: Optional[bool] = None
"""*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied."""

View file

@ -0,0 +1,18 @@
from typing import Optional
from aiogram.types import TelegramObject
class KeyboardButtonRequestUser(TelegramObject):
"""
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.
Source: https://core.telegram.org/bots/api#keyboardbuttonrequestuser
"""
request_id: int
"""Signed 32-bit identifier of the request"""
user_is_bot: Optional[bool] = None
"""*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to request a regular user. If not specified, no additional restrictions are applied."""
user_is_premium: Optional[bool] = None
"""*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."""

View file

@ -0,0 +1,14 @@
from aiogram.types import TelegramObject
class UserShared(TelegramObject):
"""
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.
Source: https://core.telegram.org/bots/api#usershared
"""
request_id: int
"""Identifier of the request"""
user_id: int
"""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."""

View file

@ -0,0 +1,9 @@
##########
ChatShared
##########
.. automodule:: aiogram.types.chat_shared
:members:
:member-order: bysource
:undoc-members: True

View file

@ -0,0 +1,9 @@
#########################
KeyboardButtonRequestChat
#########################
.. automodule:: aiogram.types.keyboard_button_request_chat
:members:
:member-order: bysource
:undoc-members: True

View file

@ -0,0 +1,9 @@
#########################
KeyboardButtonRequestUser
#########################
.. automodule:: aiogram.types.keyboard_button_request_user
:members:
:member-order: bysource
:undoc-members: True

View file

@ -0,0 +1,9 @@
##########
UserShared
##########
.. automodule:: aiogram.types.user_shared
:members:
:member-order: bysource
:undoc-members: True