Added support for Bot API 7.0 (#1387)

* Added support for Bot API 7.0

* Fixed available tests

* Fixed text decorations

* Bot API 7.0 tests for ForwardMessages

* Bot API 7.0 tests for CopyMessages

* Bot API 7.0 tests for DeleteMessages

* Bot API 7.0 tests for GetUserChatBoosts

* Bot API 7.0 tests for SetMessageReaction

* Fixed custom_emoji attribute name

* Fixed tests

* Test parsing CallbackQuery message (inaccessible and accessible)

* Added changes description

* Bot API 7.0 tests for dispatcher handle update message_reaction

* Bot API 7.0 tests for dispatcher handle update message_reaction_count

* Bot API 7.0 tests for dispatcher handle update chat_boost

* Bot API 7.0 tests for dispatcher handle update removed_chat_boost

* fix tests: update ReactionTypeCustomEmoji custom_emoji -> custom_emoji_id

* micro fix Markdown V2 blockquote

* add tests for Markdown tools

* fix markdown test apply single entity

* add tests coverage for Message.react

* check that all messages and content types are covered for Message.content_type

* sort imports in tests (run `make reformat lint`)

* update Giveaway objects Unix time field to DateTime type

* Update Message.content_type property

* upgrade tests for message content_types and sent_copy

* Update Giveaway type generation config

* Update GiveawayWinners and PassportFile types generation configs

---------

Co-authored-by: Suren Khorenyan <surenkhorenyan@gmail.com>
This commit is contained in:
Alex Root Junior 2023-12-31 01:40:44 +02:00 committed by GitHub
parent 756cfeba0a
commit 6795b3de05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
244 changed files with 9401 additions and 1715 deletions

View file

@ -28,10 +28,10 @@
"required": true
},
{
"type": "Message",
"description": "Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old",
"html_description": "<td><em>Optional</em>. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old</td>",
"rst_description": "*Optional*. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old\n",
"type": "MaybeInaccessibleMessage",
"description": "Message sent by the bot with the callback button that originated the query",
"html_description": "<td><em>Optional</em>. Message sent by the bot with the callback button that originated the query</td>",
"rst_description": "*Optional*. Message sent by the bot with the callback button that originated the query\n",
"name": "message",
"required": false
},

View file

@ -83,19 +83,59 @@
"name": "active_usernames",
"required": false
},
{
"type": "Array of ReactionType",
"description": "List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. List of available reactions allowed in the chat. If omitted, then all <a href=\"#reactiontypeemoji\">emoji reactions</a> are allowed. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. List of available reactions allowed in the chat. If omitted, then all `emoji reactions <https://core.telegram.org/bots/api#reactiontypeemoji>`_ are allowed. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "available_reactions",
"required": false
},
{
"type": "Integer",
"description": "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat.",
"html_description": "<td><em>Optional</em>. Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See <a href=\"#accent-colors\">accent colors</a> for more details. Returned only in <a href=\"#getchat\">getChat</a>. Always returned in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See `accent colors <https://core.telegram.org/bots/api#accent-colors>`_ for more details. Returned only in :class:`aiogram.methods.get_chat.GetChat`. Always returned in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "accent_color_id",
"required": false
},
{
"type": "String",
"description": "Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"description": "Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "background_custom_emoji_id",
"required": false
},
{
"type": "Integer",
"description": "Identifier of the accent color for the chat's profile background. See profile accent colors for more details. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Identifier of the accent color for the chat's profile background. See <a href=\"#profile-accent-colors\">profile accent colors</a> for more details. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Identifier of the accent color for the chat's profile background. See `profile accent colors <https://core.telegram.org/bots/api#profile-accent-colors>`_ for more details. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "profile_accent_color_id",
"required": false
},
{
"type": "String",
"description": "Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "profile_background_custom_emoji_id",
"required": false
},
{
"type": "String",
"description": "Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "emoji_status_custom_emoji_id",
"required": false
},
{
"type": "Integer",
"description": "Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"description": "Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "emoji_status_expiration_date",
"required": false
},
@ -211,6 +251,14 @@
"name": "has_protected_content",
"required": false
},
{
"type": "True",
"description": "True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. <em>True</em>, if new chat members will have access to old messages; available only to chat administrators. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. :code:`True`, if new chat members will have access to old messages; available only to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "has_visible_history",
"required": false
},
{
"type": "String",
"description": "For supergroups, name of group sticker set. Returned only in getChat.",

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "chatboost",
"name": "ChatBoost",
"description": "This object contains information about a chat boost.",
"html_description": "<p>This object contains information about a chat boost.</p>",
"rst_description": "This object contains information about a chat boost.",
"annotations": [
{
"type": "String",
"description": "Unique identifier of the boost",
"html_description": "<td>Unique identifier of the boost</td>",
"rst_description": "Unique identifier of the boost\n",
"name": "boost_id",
"required": true
},
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when the chat was boosted",
"html_description": "<td>Point in time (Unix timestamp) when the chat was boosted</td>",
"rst_description": "Point in time (Unix timestamp) when the chat was boosted\n",
"name": "add_date",
"required": true
},
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged",
"html_description": "<td>Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged</td>",
"rst_description": "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged\n",
"name": "expiration_date",
"required": true
},
{
"type": "ChatBoostSource",
"description": "Source of the added boost",
"html_description": "<td>Source of the added boost</td>",
"rst_description": "Source of the added boost\n",
"name": "source",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,9 @@
annotations:
add_date:
parsed_type:
type: std
name: DateTime
expiration_date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "chatboostremoved",
"name": "ChatBoostRemoved",
"description": "This object represents a boost removed from a chat.",
"html_description": "<p>This object represents a boost removed from a chat.</p>",
"rst_description": "This object represents a boost removed from a chat.",
"annotations": [
{
"type": "Chat",
"description": "Chat which was boosted",
"html_description": "<td>Chat which was boosted</td>",
"rst_description": "Chat which was boosted\n",
"name": "chat",
"required": true
},
{
"type": "String",
"description": "Unique identifier of the boost",
"html_description": "<td>Unique identifier of the boost</td>",
"rst_description": "Unique identifier of the boost\n",
"name": "boost_id",
"required": true
},
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when the boost was removed",
"html_description": "<td>Point in time (Unix timestamp) when the boost was removed</td>",
"rst_description": "Point in time (Unix timestamp) when the boost was removed\n",
"name": "remove_date",
"required": true
},
{
"type": "ChatBoostSource",
"description": "Source of the removed boost",
"html_description": "<td>Source of the removed boost</td>",
"rst_description": "Source of the removed boost\n",
"name": "source",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
remove_date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,16 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "chatboostsource",
"name": "ChatBoostSource",
"description": "This object describes the source of a chat boost. It can be one of\n - ChatBoostSourcePremium\n - ChatBoostSourceGiftCode\n - ChatBoostSourceGiveaway",
"html_description": "<p>This object describes the source of a chat boost. It can be one of</p><ul>\n<li><a href=\"#chatboostsourcepremium\">ChatBoostSourcePremium</a></li>\n<li><a href=\"#chatboostsourcegiftcode\">ChatBoostSourceGiftCode</a></li>\n<li><a href=\"#chatboostsourcegiveaway\">ChatBoostSourceGiveaway</a></li>\n</ul>",
"rst_description": "This object describes the source of a chat boost. It can be one of\n\n - :class:`aiogram.types.chat_boost_source_premium.ChatBoostSourcePremium`\n - :class:`aiogram.types.chat_boost_source_gift_code.ChatBoostSourceGiftCode`\n - :class:`aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway`",
"annotations": [],
"category": "types"
}
}

View file

@ -0,0 +1 @@
discriminator: "source"

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "chatboostsourcegiftcode",
"name": "ChatBoostSourceGiftCode",
"description": "The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.",
"html_description": "<p>The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.</p>",
"rst_description": "The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.",
"annotations": [
{
"type": "String",
"description": "Source of the boost, always 'gift_code'",
"html_description": "<td>Source of the boost, always &#8220;gift_code&#8221;</td>",
"rst_description": "Source of the boost, always 'gift_code'\n",
"name": "source",
"required": true
},
{
"type": "User",
"description": "User for which the gift code was created",
"html_description": "<td>User for which the gift code was created</td>",
"rst_description": "User for which the gift code was created\n",
"name": "user",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "chatboostsourcegiveaway",
"name": "ChatBoostSourceGiveaway",
"description": "The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.",
"html_description": "<p>The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.</p>",
"rst_description": "The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.",
"annotations": [
{
"type": "String",
"description": "Source of the boost, always 'giveaway'",
"html_description": "<td>Source of the boost, always &#8220;giveaway&#8221;</td>",
"rst_description": "Source of the boost, always 'giveaway'\n",
"name": "source",
"required": true
},
{
"type": "Integer",
"description": "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet.",
"html_description": "<td>Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet.</td>",
"rst_description": "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet.\n",
"name": "giveaway_message_id",
"required": true
},
{
"type": "User",
"description": "User that won the prize in the giveaway if any",
"html_description": "<td><em>Optional</em>. User that won the prize in the giveaway if any</td>",
"rst_description": "*Optional*. User that won the prize in the giveaway if any\n",
"name": "user",
"required": false
},
{
"type": "True",
"description": "True, if the giveaway was completed, but there was no user to win the prize",
"html_description": "<td><em>Optional</em>. True, if the giveaway was completed, but there was no user to win the prize</td>",
"rst_description": "*Optional*. True, if the giveaway was completed, but there was no user to win the prize\n",
"name": "is_unclaimed",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "chatboostsourcepremium",
"name": "ChatBoostSourcePremium",
"description": "The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.",
"html_description": "<p>The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.</p>",
"rst_description": "The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.",
"annotations": [
{
"type": "String",
"description": "Source of the boost, always 'premium'",
"html_description": "<td>Source of the boost, always &#8220;premium&#8221;</td>",
"rst_description": "Source of the boost, always 'premium'\n",
"name": "source",
"required": true
},
{
"type": "User",
"description": "User that boosted the chat",
"html_description": "<td>User that boosted the chat</td>",
"rst_description": "User that boosted the chat\n",
"name": "user",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "chatboostupdated",
"name": "ChatBoostUpdated",
"description": "This object represents a boost added to a chat or changed.",
"html_description": "<p>This object represents a boost added to a chat or changed.</p>",
"rst_description": "This object represents a boost added to a chat or changed.",
"annotations": [
{
"type": "Chat",
"description": "Chat which was boosted",
"html_description": "<td>Chat which was boosted</td>",
"rst_description": "Chat which was boosted\n",
"name": "chat",
"required": true
},
{
"type": "ChatBoost",
"description": "Infomation about the chat boost",
"html_description": "<td>Infomation about the chat boost</td>",
"rst_description": "Infomation about the chat boost\n",
"name": "boost",
"required": true
}
],
"category": "types"
}
}

View file

@ -37,9 +37,9 @@
},
{
"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",
"description": "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues",
"html_description": "<td><em>True</em>, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues</td>",
"rst_description": ":code:`True`, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues\n",
"name": "can_send_messages",
"required": true
},

View file

@ -13,9 +13,9 @@
"annotations": [
{
"type": "Boolean",
"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",
"description": "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues\n",
"name": "can_send_messages",
"required": false
},

View file

@ -0,0 +1,201 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "externalreplyinfo",
"name": "ExternalReplyInfo",
"description": "This object contains information about a message that is being replied to, which may come from another chat or forum topic.",
"html_description": "<p>This object contains information about a message that is being replied to, which may come from another chat or forum topic.</p>",
"rst_description": "This object contains information about a message that is being replied to, which may come from another chat or forum topic.",
"annotations": [
{
"type": "MessageOrigin",
"description": "Origin of the message replied to by the given message",
"html_description": "<td>Origin of the message replied to by the given message</td>",
"rst_description": "Origin of the message replied to by the given message\n",
"name": "origin",
"required": true
},
{
"type": "Chat",
"description": "Chat the original message belongs to. Available only if the chat is a supergroup or a channel.",
"html_description": "<td><em>Optional</em>. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.</td>",
"rst_description": "*Optional*. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.\n",
"name": "chat",
"required": false
},
{
"type": "Integer",
"description": "Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.",
"html_description": "<td><em>Optional</em>. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.</td>",
"rst_description": "*Optional*. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.\n",
"name": "message_id",
"required": false
},
{
"type": "LinkPreviewOptions",
"description": "Options used for link preview generation for the original message, if it is a text message",
"html_description": "<td><em>Optional</em>. Options used for link preview generation for the original message, if it is a text message</td>",
"rst_description": "*Optional*. Options used for link preview generation for the original message, if it is a text message\n",
"name": "link_preview_options",
"required": false
},
{
"type": "Animation",
"description": "Message is an animation, information about the animation",
"html_description": "<td><em>Optional</em>. Message is an animation, information about the animation</td>",
"rst_description": "*Optional*. Message is an animation, information about the animation\n",
"name": "animation",
"required": false
},
{
"type": "Audio",
"description": "Message is an audio file, information about the file",
"html_description": "<td><em>Optional</em>. Message is an audio file, information about the file</td>",
"rst_description": "*Optional*. Message is an audio file, information about the file\n",
"name": "audio",
"required": false
},
{
"type": "Document",
"description": "Message is a general file, information about the file",
"html_description": "<td><em>Optional</em>. Message is a general file, information about the file</td>",
"rst_description": "*Optional*. Message is a general file, information about the file\n",
"name": "document",
"required": false
},
{
"type": "Array of PhotoSize",
"description": "Message is a photo, available sizes of the photo",
"html_description": "<td><em>Optional</em>. Message is a photo, available sizes of the photo</td>",
"rst_description": "*Optional*. Message is a photo, available sizes of the photo\n",
"name": "photo",
"required": false
},
{
"type": "Sticker",
"description": "Message is a sticker, information about the sticker",
"html_description": "<td><em>Optional</em>. Message is a sticker, information about the sticker</td>",
"rst_description": "*Optional*. Message is a sticker, information about the sticker\n",
"name": "sticker",
"required": false
},
{
"type": "Story",
"description": "Message is a forwarded story",
"html_description": "<td><em>Optional</em>. Message is a forwarded story</td>",
"rst_description": "*Optional*. Message is a forwarded story\n",
"name": "story",
"required": false
},
{
"type": "Video",
"description": "Message is a video, information about the video",
"html_description": "<td><em>Optional</em>. Message is a video, information about the video</td>",
"rst_description": "*Optional*. Message is a video, information about the video\n",
"name": "video",
"required": false
},
{
"type": "VideoNote",
"description": "Message is a video note, information about the video message",
"html_description": "<td><em>Optional</em>. Message is a <a href=\"https://telegram.org/blog/video-messages-and-telescope\">video note</a>, information about the video message</td>",
"rst_description": "*Optional*. Message is a `video note <https://telegram.org/blog/video-messages-and-telescope>`_, information about the video message\n",
"name": "video_note",
"required": false
},
{
"type": "Voice",
"description": "Message is a voice message, information about the file",
"html_description": "<td><em>Optional</em>. Message is a voice message, information about the file</td>",
"rst_description": "*Optional*. Message is a voice message, information about the file\n",
"name": "voice",
"required": false
},
{
"type": "True",
"description": "True, if the message media is covered by a spoiler animation",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the message media is covered by a spoiler animation</td>",
"rst_description": "*Optional*. :code:`True`, if the message media is covered by a spoiler animation\n",
"name": "has_media_spoiler",
"required": false
},
{
"type": "Contact",
"description": "Message is a shared contact, information about the contact",
"html_description": "<td><em>Optional</em>. Message is a shared contact, information about the contact</td>",
"rst_description": "*Optional*. Message is a shared contact, information about the contact\n",
"name": "contact",
"required": false
},
{
"type": "Dice",
"description": "Message is a dice with random value",
"html_description": "<td><em>Optional</em>. Message is a dice with random value</td>",
"rst_description": "*Optional*. Message is a dice with random value\n",
"name": "dice",
"required": false
},
{
"type": "Game",
"description": "Message is a game, information about the game.",
"html_description": "<td><em>Optional</em>. Message is a game, information about the game. <a href=\"#games\">More about games &#187;</a></td>",
"rst_description": "*Optional*. Message is a game, information about the game. `More about games » <https://core.telegram.org/bots/api#games>`_\n",
"name": "game",
"required": false
},
{
"type": "Giveaway",
"description": "Message is a scheduled giveaway, information about the giveaway",
"html_description": "<td><em>Optional</em>. Message is a scheduled giveaway, information about the giveaway</td>",
"rst_description": "*Optional*. Message is a scheduled giveaway, information about the giveaway\n",
"name": "giveaway",
"required": false
},
{
"type": "GiveawayWinners",
"description": "A giveaway with public winners was completed",
"html_description": "<td><em>Optional</em>. A giveaway with public winners was completed</td>",
"rst_description": "*Optional*. A giveaway with public winners was completed\n",
"name": "giveaway_winners",
"required": false
},
{
"type": "Invoice",
"description": "Message is an invoice for a payment, information about the invoice.",
"html_description": "<td><em>Optional</em>. Message is an invoice for a <a href=\"#payments\">payment</a>, information about the invoice. <a href=\"#payments\">More about payments &#187;</a></td>",
"rst_description": "*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>`_\n",
"name": "invoice",
"required": false
},
{
"type": "Location",
"description": "Message is a shared location, information about the location",
"html_description": "<td><em>Optional</em>. Message is a shared location, information about the location</td>",
"rst_description": "*Optional*. Message is a shared location, information about the location\n",
"name": "location",
"required": false
},
{
"type": "Poll",
"description": "Message is a native poll, information about the poll",
"html_description": "<td><em>Optional</em>. Message is a native poll, information about the poll</td>",
"rst_description": "*Optional*. Message is a native poll, information about the poll\n",
"name": "poll",
"required": false
},
{
"type": "Venue",
"description": "Message is a venue, information about the venue",
"html_description": "<td><em>Optional</em>. Message is a venue, information about the venue</td>",
"rst_description": "*Optional*. Message is a venue, information about the venue\n",
"name": "venue",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,81 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "giveaway",
"name": "Giveaway",
"description": "This object represents a message about a scheduled giveaway.",
"html_description": "<p>This object represents a message about a scheduled giveaway.</p>",
"rst_description": "This object represents a message about a scheduled giveaway.",
"annotations": [
{
"type": "Array of Chat",
"description": "The list of chats which the user must join to participate in the giveaway",
"html_description": "<td>The list of chats which the user must join to participate in the giveaway</td>",
"rst_description": "The list of chats which the user must join to participate in the giveaway\n",
"name": "chats",
"required": true
},
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when winners of the giveaway will be selected",
"html_description": "<td>Point in time (Unix timestamp) when winners of the giveaway will be selected</td>",
"rst_description": "Point in time (Unix timestamp) when winners of the giveaway will be selected\n",
"name": "winners_selection_date",
"required": true
},
{
"type": "Integer",
"description": "The number of users which are supposed to be selected as winners of the giveaway",
"html_description": "<td>The number of users which are supposed to be selected as winners of the giveaway</td>",
"rst_description": "The number of users which are supposed to be selected as winners of the giveaway\n",
"name": "winner_count",
"required": true
},
{
"type": "True",
"description": "True, if only users who join the chats after the giveaway started should be eligible to win",
"html_description": "<td><em>Optional</em>. <em>True</em>, if only users who join the chats after the giveaway started should be eligible to win</td>",
"rst_description": "*Optional*. :code:`True`, if only users who join the chats after the giveaway started should be eligible to win\n",
"name": "only_new_members",
"required": false
},
{
"type": "True",
"description": "True, if the list of giveaway winners will be visible to everyone",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the list of giveaway winners will be visible to everyone</td>",
"rst_description": "*Optional*. :code:`True`, if the list of giveaway winners will be visible to everyone\n",
"name": "has_public_winners",
"required": false
},
{
"type": "String",
"description": "Description of additional giveaway prize",
"html_description": "<td><em>Optional</em>. Description of additional giveaway prize</td>",
"rst_description": "*Optional*. Description of additional giveaway prize\n",
"name": "prize_description",
"required": false
},
{
"type": "Array of String",
"description": "A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.",
"html_description": "<td><em>Optional</em>. A list of two-letter <a href=\"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\">ISO 3166-1 alpha-2</a> country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.</td>",
"rst_description": "*Optional*. A list of two-letter `ISO 3166-1 alpha-2 <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_ country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.\n",
"name": "country_codes",
"required": false
},
{
"type": "Integer",
"description": "The number of months the Telegram Premium subscription won from the giveaway will be active for",
"html_description": "<td><em>Optional</em>. The number of months the Telegram Premium subscription won from the giveaway will be active for</td>",
"rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for\n",
"name": "premium_subscription_month_count",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
winners_selection_date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "giveawaycompleted",
"name": "GiveawayCompleted",
"description": "This object represents a service message about the completion of a giveaway without public winners.",
"html_description": "<p>This object represents a service message about the completion of a giveaway without public winners.</p>",
"rst_description": "This object represents a service message about the completion of a giveaway without public winners.",
"annotations": [
{
"type": "Integer",
"description": "Number of winners in the giveaway",
"html_description": "<td>Number of winners in the giveaway</td>",
"rst_description": "Number of winners in the giveaway\n",
"name": "winner_count",
"required": true
},
{
"type": "Integer",
"description": "Number of undistributed prizes",
"html_description": "<td><em>Optional</em>. Number of undistributed prizes</td>",
"rst_description": "*Optional*. Number of undistributed prizes\n",
"name": "unclaimed_prize_count",
"required": false
},
{
"type": "Message",
"description": "Message with the giveaway that was completed, if it wasn't deleted",
"html_description": "<td><em>Optional</em>. Message with the giveaway that was completed, if it wasn't deleted</td>",
"rst_description": "*Optional*. Message with the giveaway that was completed, if it wasn't deleted\n",
"name": "giveaway_message",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,16 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "giveawaycreated",
"name": "GiveawayCreated",
"description": "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.",
"html_description": "<p>This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.</p>",
"rst_description": "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.",
"annotations": [],
"category": "types"
}
}

View file

@ -0,0 +1,105 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "giveawaywinners",
"name": "GiveawayWinners",
"description": "This object represents a message about the completion of a giveaway with public winners.",
"html_description": "<p>This object represents a message about the completion of a giveaway with public winners.</p>",
"rst_description": "This object represents a message about the completion of a giveaway with public winners.",
"annotations": [
{
"type": "Chat",
"description": "The chat that created the giveaway",
"html_description": "<td>The chat that created the giveaway</td>",
"rst_description": "The chat that created the giveaway\n",
"name": "chat",
"required": true
},
{
"type": "Integer",
"description": "Identifier of the messsage with the giveaway in the chat",
"html_description": "<td>Identifier of the messsage with the giveaway in the chat</td>",
"rst_description": "Identifier of the messsage with the giveaway in the chat\n",
"name": "giveaway_message_id",
"required": true
},
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when winners of the giveaway were selected",
"html_description": "<td>Point in time (Unix timestamp) when winners of the giveaway were selected</td>",
"rst_description": "Point in time (Unix timestamp) when winners of the giveaway were selected\n",
"name": "winners_selection_date",
"required": true
},
{
"type": "Integer",
"description": "Total number of winners in the giveaway",
"html_description": "<td>Total number of winners in the giveaway</td>",
"rst_description": "Total number of winners in the giveaway\n",
"name": "winner_count",
"required": true
},
{
"type": "Array of User",
"description": "List of up to 100 winners of the giveaway",
"html_description": "<td>List of up to 100 winners of the giveaway</td>",
"rst_description": "List of up to 100 winners of the giveaway\n",
"name": "winners",
"required": true
},
{
"type": "Integer",
"description": "The number of other chats the user had to join in order to be eligible for the giveaway",
"html_description": "<td><em>Optional</em>. The number of other chats the user had to join in order to be eligible for the giveaway</td>",
"rst_description": "*Optional*. The number of other chats the user had to join in order to be eligible for the giveaway\n",
"name": "additional_chat_count",
"required": false
},
{
"type": "Integer",
"description": "The number of months the Telegram Premium subscription won from the giveaway will be active for",
"html_description": "<td><em>Optional</em>. The number of months the Telegram Premium subscription won from the giveaway will be active for</td>",
"rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for\n",
"name": "premium_subscription_month_count",
"required": false
},
{
"type": "Integer",
"description": "Number of undistributed prizes",
"html_description": "<td><em>Optional</em>. Number of undistributed prizes</td>",
"rst_description": "*Optional*. Number of undistributed prizes\n",
"name": "unclaimed_prize_count",
"required": false
},
{
"type": "True",
"description": "True, if only users who had joined the chats after the giveaway started were eligible to win",
"html_description": "<td><em>Optional</em>. <em>True</em>, if only users who had joined the chats after the giveaway started were eligible to win</td>",
"rst_description": "*Optional*. :code:`True`, if only users who had joined the chats after the giveaway started were eligible to win\n",
"name": "only_new_members",
"required": false
},
{
"type": "True",
"description": "True, if the giveaway was canceled because the payment for it was refunded",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the giveaway was canceled because the payment for it was refunded</td>",
"rst_description": "*Optional*. :code:`True`, if the giveaway was canceled because the payment for it was refunded\n",
"name": "was_refunded",
"required": false
},
{
"type": "String",
"description": "Description of additional giveaway prize",
"html_description": "<td><em>Optional</em>. Description of additional giveaway prize</td>",
"rst_description": "*Optional*. Description of additional giveaway prize\n",
"name": "prize_description",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
winners_selection_date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "inaccessiblemessage",
"name": "InaccessibleMessage",
"description": "This object describes a message that was deleted or is otherwise inaccessible to the bot.",
"html_description": "<p>This object describes a message that was deleted or is otherwise inaccessible to the bot.</p>",
"rst_description": "This object describes a message that was deleted or is otherwise inaccessible to the bot.",
"annotations": [
{
"type": "Chat",
"description": "Chat the message belonged to",
"html_description": "<td>Chat the message belonged to</td>",
"rst_description": "Chat the message belonged to\n",
"name": "chat",
"required": true
},
{
"type": "Integer",
"description": "Unique message identifier inside the chat",
"html_description": "<td>Unique message identifier inside the chat</td>",
"rst_description": "Unique message identifier inside the chat\n",
"name": "message_id",
"required": true
},
{
"type": "Integer",
"description": "Always 0. The field can be used to differentiate regular and inaccessible messages.",
"html_description": "<td>Always 0. The field can be used to differentiate regular and inaccessible messages.</td>",
"rst_description": "Always 0. The field can be used to differentiate regular and inaccessible messages.\n",
"name": "date",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,7 @@
annotations:
date:
# date:
# type: std
# name: DateTime
const: "0"
# final: true

View file

@ -35,13 +35,25 @@
"name": "entities",
"required": false
},
{
"type": "LinkPreviewOptions",
"description": "Link preview generation options for the message",
"html_description": "<td><em>Optional</em>. Link preview generation options for the message</td>",
"rst_description": "*Optional*. Link preview generation options for the message\n",
"name": "link_preview_options",
"required": false
},
{
"type": "Boolean",
"description": "Disables link previews for links in the sent message",
"html_description": "<td><em>Optional</em>. Disables link previews for links in the sent message</td>",
"rst_description": "*Optional*. Disables link previews for links in the sent message\n",
"name": "disable_web_page_preview",
"required": false
"required": false,
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
}
],
"category": "types"

View file

@ -7,9 +7,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 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*.",
"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_users, 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_users 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_users</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_users</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_users*, *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_users* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*.",
"annotations": [
{
"type": "String",
@ -20,11 +20,11 @@
"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",
"type": "KeyboardButtonRequestUsers",
"description": "If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_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. Identifiers of selected users will be sent to the bot in a &#8220;users_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. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.\n",
"name": "request_users",
"required": false
},
{
@ -66,6 +66,18 @@
"rst_description": "*Optional*. If specified, the described `Web App <https://core.telegram.org/bots/webapps>`_ will be launched when the button is pressed. The Web App will be able to send a 'web_app_data' service message. Available in private chats only.\n",
"name": "web_app",
"required": false
},
{
"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,
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
}
],
"category": "types"

View file

@ -1,5 +1,10 @@
{
"meta": {},
"meta": {
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
},
"group": {
"title": "Available types",
"anchor": "available-types"

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "keyboardbuttonrequestusers",
"name": "KeyboardButtonRequestUsers",
"description": "This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed.",
"html_description": "<p>This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. <a href=\"/bots/features#chat-and-user-selection\">More about requesting users &#187;</a></p>",
"rst_description": "This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. `More about requesting users » <https://core.telegram.org/bots/features#chat-and-user-selection>`_",
"annotations": [
{
"type": "Integer",
"description": "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message",
"html_description": "<td>Signed 32-bit identifier of the request that will be received back in the <a href=\"#usersshared\">UsersShared</a> object. Must be unique within the message</td>",
"rst_description": "Signed 32-bit identifier of the request that will be received back in the :class:`aiogram.types.users_shared.UsersShared` object. Must be unique within the message\n",
"name": "request_id",
"required": true
},
{
"type": "Boolean",
"description": "Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied.",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request bots, pass <em>False</em> to request regular users. If not specified, no additional restrictions are applied.</td>",
"rst_description": "*Optional*. Pass :code:`True` to request bots, pass :code:`False` to request regular users. If not specified, no additional restrictions are applied.\n",
"name": "user_is_bot",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied.",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request premium users, pass <em>False</em> to request non-premium users. If not specified, no additional restrictions are applied.</td>",
"rst_description": "*Optional*. Pass :code:`True` to request premium users, pass :code:`False` to request non-premium users. If not specified, no additional restrictions are applied.\n",
"name": "user_is_premium",
"required": false
},
{
"type": "Integer",
"description": "The maximum number of users to be selected; 1-10. Defaults to 1.",
"html_description": "<td><em>Optional</em>. The maximum number of users to be selected; 1-10. Defaults to 1.</td>",
"rst_description": "*Optional*. The maximum number of users to be selected; 1-10. Defaults to 1.\n",
"name": "max_quantity",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "linkpreviewoptions",
"name": "LinkPreviewOptions",
"description": "Describes the options used for link preview generation.",
"html_description": "<p>Describes the options used for link preview generation.</p>",
"rst_description": "Describes the options used for link preview generation.",
"annotations": [
{
"type": "Boolean",
"description": "True, if the link preview is disabled",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the link preview is disabled</td>",
"rst_description": "*Optional*. :code:`True`, if the link preview is disabled\n",
"name": "is_disabled",
"required": false
},
{
"type": "String",
"description": "URL to use for the link preview. If empty, then the first URL found in the message text will be used",
"html_description": "<td><em>Optional</em>. URL to use for the link preview. If empty, then the first URL found in the message text will be used</td>",
"rst_description": "*Optional*. URL to use for the link preview. If empty, then the first URL found in the message text will be used\n",
"name": "url",
"required": false
},
{
"type": "Boolean",
"description": "True, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview</td>",
"rst_description": "*Optional*. :code:`True`, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview\n",
"name": "prefer_small_media",
"required": false
},
{
"type": "Boolean",
"description": "True, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview</td>",
"rst_description": "*Optional*. :code:`True`, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview\n",
"name": "prefer_large_media",
"required": false
},
{
"type": "Boolean",
"description": "True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text</td>",
"rst_description": "*Optional*. :code:`True`, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text\n",
"name": "show_above_text",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,16 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "maybeinaccessiblemessage",
"name": "MaybeInaccessibleMessage",
"description": "This object describes a message that can be inaccessible to the bot. It can be one of\n - Message\n - InaccessibleMessage",
"html_description": "<p>This object describes a message that can be inaccessible to the bot. It can be one of</p><ul>\n<li><a href=\"#message\">Message</a></li>\n<li><a href=\"#inaccessiblemessage\">InaccessibleMessage</a></li>\n</ul>",
"rst_description": "This object describes a message that can be inaccessible to the bot. It can be one of\n\n - :class:`aiogram.types.message.Message`\n - :class:`aiogram.types.inaccessible_message.InaccessibleMessage`",
"annotations": [],
"category": "types"
}
}

View file

@ -0,0 +1 @@
tagged: true

View file

@ -240,3 +240,8 @@ unpin:
method: unpinChatMessage
code: *assert-chat
fill: *message-target
react:
method: setMessageReaction
code: *assert-chat
fill: *message-target

View file

@ -45,66 +45,26 @@
},
{
"type": "Integer",
"description": "Date the message was sent in Unix time",
"html_description": "<td>Date the message was sent in Unix time</td>",
"rst_description": "Date the message was sent in Unix time\n",
"description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date.",
"html_description": "<td>Date the message was sent in Unix time. It is always a positive number, representing a valid date.</td>",
"rst_description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date.\n",
"name": "date",
"required": true
},
{
"type": "Chat",
"description": "Conversation the message belongs to",
"html_description": "<td>Conversation the message belongs to</td>",
"rst_description": "Conversation the message belongs to\n",
"description": "Chat the message belongs to",
"html_description": "<td>Chat the message belongs to</td>",
"rst_description": "Chat the message belongs to\n",
"name": "chat",
"required": true
},
{
"type": "User",
"description": "For forwarded messages, sender of the original message",
"html_description": "<td><em>Optional</em>. For forwarded messages, sender of the original message</td>",
"rst_description": "*Optional*. For forwarded messages, sender of the original message\n",
"name": "forward_from",
"required": false
},
{
"type": "Chat",
"description": "For messages forwarded from channels or from anonymous administrators, information about the original sender chat",
"html_description": "<td><em>Optional</em>. For messages forwarded from channels or from anonymous administrators, information about the original sender chat</td>",
"rst_description": "*Optional*. For messages forwarded from channels or from anonymous administrators, information about the original sender chat\n",
"name": "forward_from_chat",
"required": false
},
{
"type": "Integer",
"description": "For messages forwarded from channels, identifier of the original message in the channel",
"html_description": "<td><em>Optional</em>. For messages forwarded from channels, identifier of the original message in the channel</td>",
"rst_description": "*Optional*. For messages forwarded from channels, identifier of the original message in the channel\n",
"name": "forward_from_message_id",
"required": false
},
{
"type": "String",
"description": "For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present",
"html_description": "<td><em>Optional</em>. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present</td>",
"rst_description": "*Optional*. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present\n",
"name": "forward_signature",
"required": false
},
{
"type": "String",
"description": "Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages",
"html_description": "<td><em>Optional</em>. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages</td>",
"rst_description": "*Optional*. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages\n",
"name": "forward_sender_name",
"required": false
},
{
"type": "Integer",
"description": "For forwarded messages, date the original message was sent in Unix time",
"html_description": "<td><em>Optional</em>. For forwarded messages, date the original message was sent in Unix time</td>",
"rst_description": "*Optional*. For forwarded messages, date the original message was sent in Unix time\n",
"name": "forward_date",
"type": "MessageOrigin",
"description": "Information about the original message for forwarded messages",
"html_description": "<td><em>Optional</em>. Information about the original message for forwarded messages</td>",
"rst_description": "*Optional*. Information about the original message for forwarded messages\n",
"name": "forward_origin",
"required": false
},
{
@ -125,12 +85,28 @@
},
{
"type": "Message",
"description": "For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. For replies, the original message. Note that the Message object in this field will not contain further <em>reply_to_message</em> fields even if it itself is a reply.</td>",
"rst_description": "*Optional*. For replies, the original message. Note that the Message object in this field will not contain further *reply_to_message* fields even if it itself is a reply.\n",
"description": "For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further <em>reply_to_message</em> fields even if it itself is a reply.</td>",
"rst_description": "*Optional*. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further *reply_to_message* fields even if it itself is a reply.\n",
"name": "reply_to_message",
"required": false
},
{
"type": "ExternalReplyInfo",
"description": "Information about the message that is being replied to, which may come from another chat or forum topic",
"html_description": "<td><em>Optional</em>. Information about the message that is being replied to, which may come from another chat or forum topic</td>",
"rst_description": "*Optional*. Information about the message that is being replied to, which may come from another chat or forum topic\n",
"name": "external_reply",
"required": false
},
{
"type": "TextQuote",
"description": "For replies that quote part of the original message, the quoted part of the message",
"html_description": "<td><em>Optional</em>. For replies that quote part of the original message, the quoted part of the message</td>",
"rst_description": "*Optional*. For replies that quote part of the original message, the quoted part of the message\n",
"name": "quote",
"required": false
},
{
"type": "User",
"description": "Bot through which the message was sent",
@ -187,6 +163,14 @@
"name": "entities",
"required": false
},
{
"type": "LinkPreviewOptions",
"description": "Options used for link preview generation for the message, if it is a text message and link preview options were changed",
"html_description": "<td><em>Optional</em>. Options used for link preview generation for the message, if it is a text message and link preview options were changed</td>",
"rst_description": "*Optional*. Options used for link preview generation for the message, if it is a text message and link preview options were changed\n",
"name": "link_preview_options",
"required": false
},
{
"type": "Animation",
"description": "Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set",
@ -420,10 +404,10 @@
"required": false
},
{
"type": "Message",
"description": "Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.",
"html_description": "<td><em>Optional</em>. Specified message was pinned. Note that the Message object in this field will not contain further <em>reply_to_message</em> fields even if it is itself a reply.</td>",
"rst_description": "*Optional*. Specified message was pinned. Note that the Message object in this field will not contain further *reply_to_message* fields even if it is itself a reply.\n",
"type": "MaybeInaccessibleMessage",
"description": "Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.",
"html_description": "<td><em>Optional</em>. Specified message was pinned. Note that the Message object in this field will not contain further <em>reply_to_message</em> fields even if it itself is a reply.</td>",
"rst_description": "*Optional*. Specified message was pinned. Note that the Message object in this field will not contain further *reply_to_message* fields even if it itself is a reply.\n",
"name": "pinned_message",
"required": false
},
@ -444,11 +428,11 @@
"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",
"type": "UsersShared",
"description": "Service message: users were shared with the bot",
"html_description": "<td><em>Optional</em>. Service message: users were shared with the bot</td>",
"rst_description": "*Optional*. Service message: users were shared with the bot\n",
"name": "users_shared",
"required": false
},
{
@ -539,6 +523,38 @@
"name": "general_forum_topic_unhidden",
"required": false
},
{
"type": "GiveawayCreated",
"description": "Service message: a scheduled giveaway was created",
"html_description": "<td><em>Optional</em>. Service message: a scheduled giveaway was created</td>",
"rst_description": "*Optional*. Service message: a scheduled giveaway was created\n",
"name": "giveaway_created",
"required": false
},
{
"type": "Giveaway",
"description": "The message is a scheduled giveaway message",
"html_description": "<td><em>Optional</em>. The message is a scheduled giveaway message</td>",
"rst_description": "*Optional*. The message is a scheduled giveaway message\n",
"name": "giveaway",
"required": false
},
{
"type": "GiveawayWinners",
"description": "A giveaway with public winners was completed",
"html_description": "<td><em>Optional</em>. A giveaway with public winners was completed</td>",
"rst_description": "*Optional*. A giveaway with public winners was completed\n",
"name": "giveaway_winners",
"required": false
},
{
"type": "GiveawayCompleted",
"description": "Service message: a giveaway without public winners was completed",
"html_description": "<td><em>Optional</em>. Service message: a giveaway without public winners was completed</td>",
"rst_description": "*Optional*. Service message: a giveaway without public winners was completed\n",
"name": "giveaway_completed",
"required": false
},
{
"type": "VideoChatScheduled",
"description": "Service message: video chat scheduled",
@ -586,6 +602,90 @@
"rst_description": "*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.\n",
"name": "reply_markup",
"required": false
},
{
"type": "Integer",
"description": "For forwarded messages, date the original message was sent in Unix time",
"html_description": "<td><em>Optional</em>. For forwarded messages, date the original message was sent in Unix time</td>",
"rst_description": "*Optional*. For forwarded messages, date the original message was sent in Unix time\n",
"name": "forward_date",
"required": false,
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
},
{
"type": "User",
"description": "For forwarded messages, sender of the original message",
"html_description": "<td><em>Optional</em>. For forwarded messages, sender of the original message</td>",
"rst_description": "*Optional*. For forwarded messages, sender of the original message\n",
"name": "forward_from",
"required": false,
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
},
{
"type": "Chat",
"description": "For messages forwarded from channels or from anonymous administrators, information about the original sender chat",
"html_description": "<td><em>Optional</em>. For messages forwarded from channels or from anonymous administrators, information about the original sender chat</td>",
"rst_description": "*Optional*. For messages forwarded from channels or from anonymous administrators, information about the original sender chat\n",
"name": "forward_from_chat",
"required": false,
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
},
{
"type": "Integer",
"description": "For messages forwarded from channels, identifier of the original message in the channel",
"html_description": "<td><em>Optional</em>. For messages forwarded from channels, identifier of the original message in the channel</td>",
"rst_description": "*Optional*. For messages forwarded from channels, identifier of the original message in the channel\n",
"name": "forward_from_message_id",
"required": false,
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
},
{
"type": "String",
"description": "Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages",
"html_description": "<td><em>Optional</em>. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages</td>",
"rst_description": "*Optional*. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages\n",
"name": "forward_sender_name",
"required": false,
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
},
{
"type": "String",
"description": "For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present",
"html_description": "<td><em>Optional</em>. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present</td>",
"rst_description": "*Optional*. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present\n",
"name": "forward_signature",
"required": false,
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
},
{
"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,
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
}
],
"category": "types"

View file

@ -13,9 +13,9 @@
"annotations": [
{
"type": "String",
"description": "Type of the entity. Currently, can be 'mention' (@username), 'hashtag' (#hashtag), 'cashtag' ($USD), 'bot_command' (/start@jobs_bot), 'url' (https://telegram.org), 'email' (do-not-reply@telegram.org), 'phone_number' (+1-212-555-0123), 'bold' (bold text), 'italic' (italic text), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users without usernames), 'custom_emoji' (for inline custom emoji stickers)",
"html_description": "<td>Type of the entity. Currently, can be &#8220;mention&#8221; (<code>@username</code>), &#8220;hashtag&#8221; (<code>#hashtag</code>), &#8220;cashtag&#8221; (<code>$USD</code>), &#8220;bot_command&#8221; (<code>/start@jobs_bot</code>), &#8220;url&#8221; (<code>https://telegram.org</code>), &#8220;email&#8221; (<code>do-not-reply@telegram.org</code>), &#8220;phone_number&#8221; (<code>+1-212-555-0123</code>), &#8220;bold&#8221; (<strong>bold text</strong>), &#8220;italic&#8221; (<em>italic text</em>), &#8220;underline&#8221; (underlined text), &#8220;strikethrough&#8221; (strikethrough text), &#8220;spoiler&#8221; (spoiler message), &#8220;code&#8221; (monowidth string), &#8220;pre&#8221; (monowidth block), &#8220;text_link&#8221; (for clickable text URLs), &#8220;text_mention&#8221; (for users <a href=\"https://telegram.org/blog/edit#new-mentions\">without usernames</a>), &#8220;custom_emoji&#8221; (for inline custom emoji stickers)</td>",
"rst_description": "Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames <https://telegram.org/blog/edit#new-mentions>`_), 'custom_emoji' (for inline custom emoji stickers)\n",
"description": "Type of the entity. Currently, can be 'mention' (@username), 'hashtag' (#hashtag), 'cashtag' ($USD), 'bot_command' (/start@jobs_bot), 'url' (https://telegram.org), 'email' (do-not-reply@telegram.org), 'phone_number' (+1-212-555-0123), 'bold' (bold text), 'italic' (italic text), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users without usernames), 'custom_emoji' (for inline custom emoji stickers)",
"html_description": "<td>Type of the entity. Currently, can be &#8220;mention&#8221; (<code>@username</code>), &#8220;hashtag&#8221; (<code>#hashtag</code>), &#8220;cashtag&#8221; (<code>$USD</code>), &#8220;bot_command&#8221; (<code>/start@jobs_bot</code>), &#8220;url&#8221; (<code>https://telegram.org</code>), &#8220;email&#8221; (<code>do-not-reply@telegram.org</code>), &#8220;phone_number&#8221; (<code>+1-212-555-0123</code>), &#8220;bold&#8221; (<strong>bold text</strong>), &#8220;italic&#8221; (<em>italic text</em>), &#8220;underline&#8221; (underlined text), &#8220;strikethrough&#8221; (strikethrough text), &#8220;spoiler&#8221; (spoiler message), &#8220;blockquote&#8221; (block quotation), &#8220;code&#8221; (monowidth string), &#8220;pre&#8221; (monowidth block), &#8220;text_link&#8221; (for clickable text URLs), &#8220;text_mention&#8221; (for users <a href=\"https://telegram.org/blog/edit#new-mentions\">without usernames</a>), &#8220;custom_emoji&#8221; (for inline custom emoji stickers)</td>",
"rst_description": "Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames <https://telegram.org/blog/edit#new-mentions>`_), 'custom_emoji' (for inline custom emoji stickers)\n",
"name": "type",
"required": true
},

View file

@ -0,0 +1,16 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "messageorigin",
"name": "MessageOrigin",
"description": "This object describes the origin of a message. It can be one of\n - MessageOriginUser\n - MessageOriginHiddenUser\n - MessageOriginChat\n - MessageOriginChannel",
"html_description": "<p>This object describes the origin of a message. It can be one of</p><ul>\n<li><a href=\"#messageoriginuser\">MessageOriginUser</a></li>\n<li><a href=\"#messageoriginhiddenuser\">MessageOriginHiddenUser</a></li>\n<li><a href=\"#messageoriginchat\">MessageOriginChat</a></li>\n<li><a href=\"#messageoriginchannel\">MessageOriginChannel</a></li>\n</ul>",
"rst_description": "This object describes the origin of a message. It can be one of\n\n - :class:`aiogram.types.message_origin_user.MessageOriginUser`\n - :class:`aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser`\n - :class:`aiogram.types.message_origin_chat.MessageOriginChat`\n - :class:`aiogram.types.message_origin_channel.MessageOriginChannel`",
"annotations": [],
"category": "types"
}
}

View file

@ -0,0 +1 @@
discriminator: "type"

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "messageoriginchannel",
"name": "MessageOriginChannel",
"description": "The message was originally sent to a channel chat.",
"html_description": "<p>The message was originally sent to a channel chat.</p>",
"rst_description": "The message was originally sent to a channel chat.",
"annotations": [
{
"type": "String",
"description": "Type of the message origin, always 'channel'",
"html_description": "<td>Type of the message origin, always &#8220;channel&#8221;</td>",
"rst_description": "Type of the message origin, always 'channel'\n",
"name": "type",
"required": true
},
{
"type": "Integer",
"description": "Date the message was sent originally in Unix time",
"html_description": "<td>Date the message was sent originally in Unix time</td>",
"rst_description": "Date the message was sent originally in Unix time\n",
"name": "date",
"required": true
},
{
"type": "Chat",
"description": "Channel chat to which the message was originally sent",
"html_description": "<td>Channel chat to which the message was originally sent</td>",
"rst_description": "Channel chat to which the message was originally sent\n",
"name": "chat",
"required": true
},
{
"type": "Integer",
"description": "Unique message identifier inside the chat",
"html_description": "<td>Unique message identifier inside the chat</td>",
"rst_description": "Unique message identifier inside the chat\n",
"name": "message_id",
"required": true
},
{
"type": "String",
"description": "Signature of the original post author",
"html_description": "<td><em>Optional</em>. Signature of the original post author</td>",
"rst_description": "*Optional*. Signature of the original post author\n",
"name": "author_signature",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "messageoriginchat",
"name": "MessageOriginChat",
"description": "The message was originally sent on behalf of a chat to a group chat.",
"html_description": "<p>The message was originally sent on behalf of a chat to a group chat.</p>",
"rst_description": "The message was originally sent on behalf of a chat to a group chat.",
"annotations": [
{
"type": "String",
"description": "Type of the message origin, always 'chat'",
"html_description": "<td>Type of the message origin, always &#8220;chat&#8221;</td>",
"rst_description": "Type of the message origin, always 'chat'\n",
"name": "type",
"required": true
},
{
"type": "Integer",
"description": "Date the message was sent originally in Unix time",
"html_description": "<td>Date the message was sent originally in Unix time</td>",
"rst_description": "Date the message was sent originally in Unix time\n",
"name": "date",
"required": true
},
{
"type": "Chat",
"description": "Chat that sent the message originally",
"html_description": "<td>Chat that sent the message originally</td>",
"rst_description": "Chat that sent the message originally\n",
"name": "sender_chat",
"required": true
},
{
"type": "String",
"description": "For messages originally sent by an anonymous chat administrator, original message author signature",
"html_description": "<td><em>Optional</em>. For messages originally sent by an anonymous chat administrator, original message author signature</td>",
"rst_description": "*Optional*. For messages originally sent by an anonymous chat administrator, original message author signature\n",
"name": "author_signature",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "messageoriginhiddenuser",
"name": "MessageOriginHiddenUser",
"description": "The message was originally sent by an unknown user.",
"html_description": "<p>The message was originally sent by an unknown user.</p>",
"rst_description": "The message was originally sent by an unknown user.",
"annotations": [
{
"type": "String",
"description": "Type of the message origin, always 'hidden_user'",
"html_description": "<td>Type of the message origin, always &#8220;hidden_user&#8221;</td>",
"rst_description": "Type of the message origin, always 'hidden_user'\n",
"name": "type",
"required": true
},
{
"type": "Integer",
"description": "Date the message was sent originally in Unix time",
"html_description": "<td>Date the message was sent originally in Unix time</td>",
"rst_description": "Date the message was sent originally in Unix time\n",
"name": "date",
"required": true
},
{
"type": "String",
"description": "Name of the user that sent the message originally",
"html_description": "<td>Name of the user that sent the message originally</td>",
"rst_description": "Name of the user that sent the message originally\n",
"name": "sender_user_name",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "messageoriginuser",
"name": "MessageOriginUser",
"description": "The message was originally sent by a known user.",
"html_description": "<p>The message was originally sent by a known user.</p>",
"rst_description": "The message was originally sent by a known user.",
"annotations": [
{
"type": "String",
"description": "Type of the message origin, always 'user'",
"html_description": "<td>Type of the message origin, always &#8220;user&#8221;</td>",
"rst_description": "Type of the message origin, always 'user'\n",
"name": "type",
"required": true
},
{
"type": "Integer",
"description": "Date the message was sent originally in Unix time",
"html_description": "<td>Date the message was sent originally in Unix time</td>",
"rst_description": "Date the message was sent originally in Unix time\n",
"name": "date",
"required": true
},
{
"type": "User",
"description": "User that sent the message originally",
"html_description": "<td>User that sent the message originally</td>",
"rst_description": "User that sent the message originally\n",
"name": "sender_user",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "messagereactioncountupdated",
"name": "MessageReactionCountUpdated",
"description": "This object represents reaction changes on a message with anonymous reactions.",
"html_description": "<p>This object represents reaction changes on a message with anonymous reactions.</p>",
"rst_description": "This object represents reaction changes on a message with anonymous reactions.",
"annotations": [
{
"type": "Chat",
"description": "The chat containing the message",
"html_description": "<td>The chat containing the message</td>",
"rst_description": "The chat containing the message\n",
"name": "chat",
"required": true
},
{
"type": "Integer",
"description": "Unique message identifier inside the chat",
"html_description": "<td>Unique message identifier inside the chat</td>",
"rst_description": "Unique message identifier inside the chat\n",
"name": "message_id",
"required": true
},
{
"type": "Integer",
"description": "Date of the change in Unix time",
"html_description": "<td>Date of the change in Unix time</td>",
"rst_description": "Date of the change in Unix time\n",
"name": "date",
"required": true
},
{
"type": "Array of ReactionCount",
"description": "List of reactions that are present on the message",
"html_description": "<td>List of reactions that are present on the message</td>",
"rst_description": "List of reactions that are present on the message\n",
"name": "reactions",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,73 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "messagereactionupdated",
"name": "MessageReactionUpdated",
"description": "This object represents a change of a reaction on a message performed by a user.",
"html_description": "<p>This object represents a change of a reaction on a message performed by a user.</p>",
"rst_description": "This object represents a change of a reaction on a message performed by a user.",
"annotations": [
{
"type": "Chat",
"description": "The chat containing the message the user reacted to",
"html_description": "<td>The chat containing the message the user reacted to</td>",
"rst_description": "The chat containing the message the user reacted to\n",
"name": "chat",
"required": true
},
{
"type": "Integer",
"description": "Unique identifier of the message inside the chat",
"html_description": "<td>Unique identifier of the message inside the chat</td>",
"rst_description": "Unique identifier of the message inside the chat\n",
"name": "message_id",
"required": true
},
{
"type": "User",
"description": "The user that changed the reaction, if the user isn't anonymous",
"html_description": "<td><em>Optional</em>. The user that changed the reaction, if the user isn't anonymous</td>",
"rst_description": "*Optional*. The user that changed the reaction, if the user isn't anonymous\n",
"name": "user",
"required": false
},
{
"type": "Chat",
"description": "The chat on behalf of which the reaction was changed, if the user is anonymous",
"html_description": "<td><em>Optional</em>. The chat on behalf of which the reaction was changed, if the user is anonymous</td>",
"rst_description": "*Optional*. The chat on behalf of which the reaction was changed, if the user is anonymous\n",
"name": "actor_chat",
"required": false
},
{
"type": "Integer",
"description": "Date of the change in Unix time",
"html_description": "<td>Date of the change in Unix time</td>",
"rst_description": "Date of the change in Unix time\n",
"name": "date",
"required": true
},
{
"type": "Array of ReactionType",
"description": "Previous list of reaction types that were set by the user",
"html_description": "<td>Previous list of reaction types that were set by the user</td>",
"rst_description": "Previous list of reaction types that were set by the user\n",
"name": "old_reaction",
"required": true
},
{
"type": "Array of ReactionType",
"description": "New list of reaction types that have been set by the user",
"html_description": "<td>New list of reaction types that have been set by the user</td>",
"rst_description": "New list of reaction types that have been set by the user\n",
"name": "new_reaction",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,5 @@
annotations:
file_date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "reactioncount",
"name": "ReactionCount",
"description": "Represents a reaction added to a message along with the number of times it was added.",
"html_description": "<p>Represents a reaction added to a message along with the number of times it was added.</p>",
"rst_description": "Represents a reaction added to a message along with the number of times it was added.",
"annotations": [
{
"type": "ReactionType",
"description": "Type of the reaction",
"html_description": "<td>Type of the reaction</td>",
"rst_description": "Type of the reaction\n",
"name": "type",
"required": true
},
{
"type": "Integer",
"description": "Number of times the reaction was added",
"html_description": "<td>Number of times the reaction was added</td>",
"rst_description": "Number of times the reaction was added\n",
"name": "total_count",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,16 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "reactiontype",
"name": "ReactionType",
"description": "This object describes the type of a reaction. Currently, it can be one of\n - ReactionTypeEmoji\n - ReactionTypeCustomEmoji",
"html_description": "<p>This object describes the type of a reaction. Currently, it can be one of</p><ul>\n<li><a href=\"#reactiontypeemoji\">ReactionTypeEmoji</a></li>\n<li><a href=\"#reactiontypecustomemoji\">ReactionTypeCustomEmoji</a></li>\n</ul>",
"rst_description": "This object describes the type of a reaction. Currently, it can be one of\n\n - :class:`aiogram.types.reaction_type_emoji.ReactionTypeEmoji`\n - :class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji`",
"annotations": [],
"category": "types"
}
}

View file

@ -0,0 +1 @@
discriminator: "type"

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "reactiontypecustomemoji",
"name": "ReactionTypeCustomEmoji",
"description": "The reaction is based on a custom emoji.",
"html_description": "<p>The reaction is based on a custom emoji.</p>",
"rst_description": "The reaction is based on a custom emoji.",
"annotations": [
{
"type": "String",
"description": "Type of the reaction, always 'custom_emoji'",
"html_description": "<td>Type of the reaction, always &#8220;custom_emoji&#8221;</td>",
"rst_description": "Type of the reaction, always 'custom_emoji'\n",
"name": "type",
"required": true
},
{
"type": "String",
"description": "Custom emoji identifier",
"html_description": "<td>Custom emoji identifier</td>",
"rst_description": "Custom emoji identifier\n",
"name": "custom_emoji_id",
"required": true
}
],
"category": "types"
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,73 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "replyparameters",
"name": "ReplyParameters",
"description": "Describes reply parameters for the message that is being sent.",
"html_description": "<p>Describes reply parameters for the message that is being sent.</p>",
"rst_description": "Describes reply parameters for the message that is being sent.",
"annotations": [
{
"type": "Integer",
"description": "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified",
"html_description": "<td>Identifier of the message that will be replied to in the current chat, or in the chat <em>chat_id</em> if it is specified</td>",
"rst_description": "Identifier of the message that will be replied to in the current chat, or in the chat *chat_id* if it is specified\n",
"name": "message_id",
"required": true
},
{
"type": "Integer or String",
"description": "If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername)",
"html_description": "<td><em>Optional</em>. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format <code>@channelusername</code>)</td>",
"rst_description": "*Optional*. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format :code:`@channelusername`)\n",
"name": "chat_id",
"required": false
},
{
"type": "Boolean",
"description": "Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic.",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic.</td>",
"rst_description": "*Optional*. Pass :code:`True` if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic.\n",
"name": "allow_sending_without_reply",
"required": false
},
{
"type": "String",
"description": "Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message.",
"html_description": "<td><em>Optional</em>. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including <em>bold</em>, <em>italic</em>, <em>underline</em>, <em>strikethrough</em>, <em>spoiler</em>, and <em>custom_emoji</em> entities. The message will fail to send if the quote isn't found in the original message.</td>",
"rst_description": "*Optional*. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities. The message will fail to send if the quote isn't found in the original message.\n",
"name": "quote",
"required": false
},
{
"type": "String",
"description": "Mode for parsing entities in the quote. See formatting options for more details.",
"html_description": "<td><em>Optional</em>. Mode for parsing entities in the quote. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "*Optional*. Mode for parsing entities in the quote. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
"name": "quote_parse_mode",
"required": false
},
{
"type": "Array of MessageEntity",
"description": "A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode.",
"html_description": "<td><em>Optional</em>. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of <em>quote_parse_mode</em>.</td>",
"rst_description": "*Optional*. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of *quote_parse_mode*.\n",
"name": "quote_entities",
"required": false
},
{
"type": "Integer",
"description": "Position of the quote in the original message in UTF-16 code units",
"html_description": "<td><em>Optional</em>. Position of the quote in the original message in UTF-16 code units</td>",
"rst_description": "*Optional*. Position of the quote in the original message in UTF-16 code units\n",
"name": "quote_position",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,3 @@
annotations:
quote_parse_mode:
value: UNSET_PARSE_MODE

View file

@ -14,8 +14,8 @@
{
"type": "String",
"description": "Two-letter ISO 3166-1 alpha-2 country code",
"html_description": "<td>Two-letter ISO 3166-1 alpha-2 country code</td>",
"rst_description": "Two-letter ISO 3166-1 alpha-2 country code\n",
"html_description": "<td>Two-letter <a href=\"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\">ISO 3166-1 alpha-2</a> country code</td>",
"rst_description": "Two-letter `ISO 3166-1 alpha-2 <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_ country code\n",
"name": "country_code",
"required": true
},

View file

@ -0,0 +1,49 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "textquote",
"name": "TextQuote",
"description": "This object contains information about the quoted part of a message that is replied to by the given message.",
"html_description": "<p>This object contains information about the quoted part of a message that is replied to by the given message.</p>",
"rst_description": "This object contains information about the quoted part of a message that is replied to by the given message.",
"annotations": [
{
"type": "String",
"description": "Text of the quoted part of a message that is replied to by the given message",
"html_description": "<td>Text of the quoted part of a message that is replied to by the given message</td>",
"rst_description": "Text of the quoted part of a message that is replied to by the given message\n",
"name": "text",
"required": true
},
{
"type": "Array of MessageEntity",
"description": "Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.",
"html_description": "<td><em>Optional</em>. Special entities that appear in the quote. Currently, only <em>bold</em>, <em>italic</em>, <em>underline</em>, <em>strikethrough</em>, <em>spoiler</em>, and <em>custom_emoji</em> entities are kept in quotes.</td>",
"rst_description": "*Optional*. Special entities that appear in the quote. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are kept in quotes.\n",
"name": "entities",
"required": false
},
{
"type": "Integer",
"description": "Approximate quote position in the original message in UTF-16 code units as specified by the sender",
"html_description": "<td>Approximate quote position in the original message in UTF-16 code units as specified by the sender</td>",
"rst_description": "Approximate quote position in the original message in UTF-16 code units as specified by the sender\n",
"name": "position",
"required": true
},
{
"type": "True",
"description": "True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.",
"html_description": "<td><em>Optional</em>. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.</td>",
"rst_description": "*Optional*. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.\n",
"name": "is_manual",
"required": false
}
],
"category": "types"
}
}

View file

@ -51,6 +51,22 @@
"name": "edited_channel_post",
"required": false
},
{
"type": "MessageReactionUpdated",
"description": "A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \"message_reaction\" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.",
"html_description": "<td><em>Optional</em>. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify <code>\"message_reaction\"</code> in the list of <em>allowed_updates</em> to receive these updates. The update isn't received for reactions set by bots.</td>",
"rst_description": "*Optional*. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify :code:`\"message_reaction\"` in the list of *allowed_updates* to receive these updates. The update isn't received for reactions set by bots.\n",
"name": "message_reaction",
"required": false
},
{
"type": "MessageReactionCountUpdated",
"description": "Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \"message_reaction_count\" in the list of allowed_updates to receive these updates.",
"html_description": "<td><em>Optional</em>. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify <code>\"message_reaction_count\"</code> in the list of <em>allowed_updates</em> to receive these updates.</td>",
"rst_description": "*Optional*. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify :code:`\"message_reaction_count\"` in the list of *allowed_updates* to receive these updates.\n",
"name": "message_reaction_count",
"required": false
},
{
"type": "InlineQuery",
"description": "New incoming inline query",
@ -130,6 +146,22 @@
"rst_description": "*Optional*. A request to join the chat has been sent. The bot must have the *can_invite_users* administrator right in the chat to receive these updates.\n",
"name": "chat_join_request",
"required": false
},
{
"type": "ChatBoostUpdated",
"description": "A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.",
"html_description": "<td><em>Optional</em>. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.</td>",
"rst_description": "*Optional*. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.\n",
"name": "chat_boost",
"required": false
},
{
"type": "ChatBoostRemoved",
"description": "A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.",
"html_description": "<td><em>Optional</em>. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.</td>",
"rst_description": "*Optional*. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.\n",
"name": "removed_chat_boost",
"required": false
}
],
"category": "types"

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "userchatboosts",
"name": "UserChatBoosts",
"description": "This object represents a list of boosts added to a chat by a user.",
"html_description": "<p>This object represents a list of boosts added to a chat by a user.</p>",
"rst_description": "This object represents a list of boosts added to a chat by a user.",
"annotations": [
{
"type": "Array of ChatBoost",
"description": "The list of boosts added to the chat by the user",
"html_description": "<td>The list of boosts added to the chat by the user</td>",
"rst_description": "The list of boosts added to the chat by the user\n",
"name": "boosts",
"required": true
}
],
"category": "types"
}
}

View file

@ -1,5 +1,10 @@
{
"meta": {},
"meta": {
"deprecated": {
"version": "7.0",
"release_date": "2023-12-29"
}
},
"group": {
"title": "Available types",
"anchor": "available-types"

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "usersshared",
"name": "UsersShared",
"description": "This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.",
"html_description": "<p>This object contains information about the users whose identifiers were shared with the bot using a <a href=\"#keyboardbuttonrequestusers\">KeyboardButtonRequestUsers</a> button.</p>",
"rst_description": "This object contains information about the users whose identifiers were shared with the bot using a :class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers` 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": "Array of Integer",
"description": "Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means.",
"html_description": "<td>Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means.</td>",
"rst_description": "Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means.\n",
"name": "user_ids",
"required": true
}
],
"category": "types"
}
}