Added base support of Bot API 7.2

This commit is contained in:
JRoot Junior 2024-03-31 21:09:13 +03:00
parent acf52f468c
commit a92cb0a03a
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2
122 changed files with 2789 additions and 563 deletions

View file

@ -1 +1 @@
7.1
7.2

View file

@ -37,3 +37,6 @@ extract:
- link_preview_options
- sender_boost_count
- reply_to_story
- business_connection_id
- sender_business_bot
- is_from_offline

View file

@ -7,9 +7,9 @@
"object": {
"anchor": "addstickertoset",
"name": "addStickerToSet",
"description": "Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.",
"html_description": "<p>Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.",
"description": "Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns True on success.",
"html_description": "<p>Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",

View file

@ -38,9 +38,9 @@
{
"type": "Array of Integer",
"required": true,
"description": "Identifiers of 1-100 messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.",
"html_description": "<td>Identifiers of 1-100 messages in the chat <em>from_chat_id</em> to copy. The identifiers must be specified in a strictly increasing order.</td>",
"rst_description": "Identifiers of 1-100 messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order.\n",
"description": "A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.",
"html_description": "<td>A JSON-serialized list of 1-100 identifiers of messages in the chat <em>from_chat_id</em> to copy. The identifiers must be specified in a strictly increasing order.</td>",
"rst_description": "A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order.\n",
"name": "message_ids"
},
{

View file

@ -43,14 +43,6 @@
"rst_description": "A JSON-serialized list of 1-50 initial stickers to be added to the sticker set\n",
"name": "stickers"
},
{
"type": "String",
"required": true,
"description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'",
"html_description": "<td>Format of stickers in the set, must be one of &#8220;static&#8221;, &#8220;animated&#8221;, &#8220;video&#8221;</td>",
"rst_description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'\n",
"name": "sticker_format"
},
{
"type": "String",
"required": false,
@ -66,6 +58,18 @@
"html_description": "<td>Pass <em>True</em> if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only</td>",
"rst_description": "Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only\n",
"name": "needs_repainting"
},
{
"type": "String",
"required": false,
"description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'",
"html_description": "<td>Format of stickers in the set, must be one of &#8220;static&#8221;, &#8220;animated&#8221;, &#8220;video&#8221;</td>",
"rst_description": "Format of stickers in the set, must be one of 'static', 'animated', 'video'\n",
"name": "sticker_format",
"deprecated": {
"version": "7.2",
"release_date": "2024-03-31"
}
}
],
"category": "methods"

View file

@ -22,9 +22,9 @@
{
"type": "Array of Integer",
"required": true,
"description": "Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted",
"html_description": "<td>Identifiers of 1-100 messages to delete. See <a href=\"#deletemessage\">deleteMessage</a> for limitations on which messages can be deleted</td>",
"rst_description": "Identifiers of 1-100 messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted\n",
"description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted",
"html_description": "<td>A JSON-serialized list of 1-100 identifiers of messages to delete. See <a href=\"#deletemessage\">deleteMessage</a> for limitations on which messages can be deleted</td>",
"rst_description": "A JSON-serialized list of 1-100 identifiers of messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted\n",
"name": "message_ids"
}
],

View file

@ -38,9 +38,9 @@
{
"type": "Array of Integer",
"required": true,
"description": "Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.",
"html_description": "<td>Identifiers of 1-100 messages in the chat <em>from_chat_id</em> to forward. The identifiers must be specified in a strictly increasing order.</td>",
"rst_description": "Identifiers of 1-100 messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order.\n",
"description": "A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.",
"html_description": "<td>A JSON-serialized list of 1-100 identifiers of messages in the chat <em>from_chat_id</em> to forward. The identifiers must be specified in a strictly increasing order.</td>",
"rst_description": "A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order.\n",
"name": "message_ids"
},
{

View file

@ -14,9 +14,9 @@
{
"type": "Array of String",
"required": true,
"description": "List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.",
"html_description": "<td>List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.</td>",
"rst_description": "List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.\n",
"description": "A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.",
"html_description": "<td>A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.</td>",
"rst_description": "A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.\n",
"name": "custom_emoji_ids"
}
],

View file

@ -118,33 +118,33 @@
{
"type": "Boolean",
"required": false,
"description": "Pass True if the administrator can post messages in the channel, or access channel statistics; channels only",
"html_description": "<td>Pass <em>True</em> if the administrator can post messages in the channel, or access channel statistics; channels only</td>",
"rst_description": "Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; channels only\n",
"description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only",
"html_description": "<td>Pass <em>True</em> if the administrator can post messages in the channel, or access channel statistics; for channels only</td>",
"rst_description": "Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only\n",
"name": "can_post_messages"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the administrator can edit messages of other users and can pin messages; channels only",
"html_description": "<td>Pass <em>True</em> if the administrator can edit messages of other users and can pin messages; channels only</td>",
"rst_description": "Pass :code:`True` if the administrator can edit messages of other users and can pin messages; channels only\n",
"description": "Pass True if the administrator can edit messages of other users and can pin messages; for channels only",
"html_description": "<td>Pass <em>True</em> if the administrator can edit messages of other users and can pin messages; for channels only</td>",
"rst_description": "Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only\n",
"name": "can_edit_messages"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the administrator can pin messages, supergroups only",
"html_description": "<td>Pass <em>True</em> if the administrator can pin messages, supergroups only</td>",
"rst_description": "Pass :code:`True` if the administrator can pin messages, supergroups only\n",
"description": "Pass True if the administrator can pin messages; for supergroups only",
"html_description": "<td>Pass <em>True</em> if the administrator can pin messages; for supergroups only</td>",
"rst_description": "Pass :code:`True` if the administrator can pin messages; for supergroups only\n",
"name": "can_pin_messages"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only",
"html_description": "<td>Pass <em>True</em> if the user is allowed to create, rename, close, and reopen forum topics, supergroups only</td>",
"rst_description": "Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only\n",
"description": "Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only",
"html_description": "<td>Pass <em>True</em> if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only</td>",
"rst_description": "Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only\n",
"name": "can_manage_topics"
}
],

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent <a href=\"#message\">Message</a> is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.</p>",
"rst_description": "Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -126,9 +134,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent <a href=\"#message\">Message</a> is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.</p><p>For sending voice messages, use the <a href=\"#sendvoice\">sendVoice</a> method instead.</p>",
"rst_description": "Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.\nFor sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -118,9 +126,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns <em>True</em> on success.</p><blockquote>\n<p>Example: The <a href=\"https://t.me/imagebot\">ImageBot</a> needs some time to process a request and upload the image. Instead of sending a text message along the lines of &#8220;Retrieving image, please wait&#8230;&#8221;, the bot may use <a href=\"#sendchataction\">sendChatAction</a> with <em>action</em> = <em>upload_photo</em>. The user will see a &#8220;sending photo&#8221; status for the bot.</p>\n</blockquote><p>We only recommend using this method when a response from the bot will take a <strong>noticeable</strong> amount of time to arrive.</p>",
"rst_description": "Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns :code:`True` on success.\n\n Example: The `ImageBot <https://t.me/imagebot>`_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot.\n\nWe only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the action will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the action will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the action will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -22,9 +30,9 @@
{
"type": "Integer",
"required": false,
"description": "Unique identifier for the target message thread; supergroups only",
"html_description": "<td>Unique identifier for the target message thread; supergroups only</td>",
"rst_description": "Unique identifier for the target message thread; supergroups only\n",
"description": "Unique identifier for the target message thread; for supergroups only",
"html_description": "<td>Unique identifier for the target message thread; for supergroups only</td>",
"rst_description": "Unique identifier for the target message thread; for supergroups only\n",
"name": "message_thread_id"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send phone contacts. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -86,9 +94,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send an animated emoji that will display a random value. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -62,9 +70,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send general files. On success, the sent <a href=\"#message\">Message</a> is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.</p>",
"rst_description": "Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -102,9 +110,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send a game. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer",
"required": true,
@ -62,9 +70,9 @@
{
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.",
"html_description": "<td>A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.</td>",
"rst_description": "A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.\n",
"description": "A JSON-serialized object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.",
"html_description": "<td>A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.</td>",
"rst_description": "A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send point on the map. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -102,9 +110,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of <a href=\"#message\">Messages</a> that were sent is returned.</p>",
"rst_description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages <https://core.telegram.org/bots/api#message>`_ that were sent is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send text messages. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -86,9 +94,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send photos. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -94,9 +102,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send a native poll. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -150,9 +158,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send static .WEBP, <a href=\"https://telegram.org/blog/animated-stickers\">animated</a> .TGS, or <a href=\"https://telegram.org/blog/video-stickers-better-reactions\">video</a> .WEBM stickers. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send static .WEBP, `animated <https://telegram.org/blog/animated-stickers>`_ .TGS, or `video <https://telegram.org/blog/video-stickers-better-reactions>`_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -30,9 +38,9 @@
{
"type": "InputFile or String",
"required": true,
"description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. More information on Sending Files. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.",
"html_description": "<td>Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. <a href=\"#sending-files\">More information on Sending Files &#187;</a>. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.</td>",
"rst_description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.\n",
"description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. More information on Sending Files. Video and animated stickers can't be sent via an HTTP URL.",
"html_description": "<td>Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. <a href=\"#sending-files\">More information on Sending Files &#187;</a>. Video and animated stickers can't be sent via an HTTP URL.</td>",
"rst_description": "Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL.\n",
"name": "sticker"
},
{
@ -70,9 +78,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send information about a venue. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -118,9 +126,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as <a href=\"#document\">Document</a>). On success, the sent <a href=\"#message\">Message</a> is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.</p>",
"rst_description": "Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -134,9 +142,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>As of <a href=\"https://telegram.org/blog/video-messages-and-telescope\">v.4.0</a>, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent <a href=\"#message\">Message</a> is returned.</p>",
"rst_description": "As of `v.4.0 <https://telegram.org/blog/video-messages-and-telescope>`_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -86,9 +94,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -11,6 +11,14 @@
"html_description": "<p>Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as <a href=\"#audio\">Audio</a> or <a href=\"#document\">Document</a>). On success, the sent <a href=\"#message\">Message</a> is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.</p>",
"rst_description": "Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.",
"annotations": [
{
"type": "String",
"required": false,
"description": "Unique identifier of the business connection on behalf of which the message will be sent",
"html_description": "<td>Unique identifier of the business connection on behalf of which the message will be sent</td>",
"rst_description": "Unique identifier of the business connection on behalf of which the message will be sent\n",
"name": "business_connection_id"
},
{
"type": "Integer or String",
"required": true,
@ -94,9 +102,9 @@
{
"type": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply",
"required": false,
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.\n",
"description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account",
"html_description": "<td>Additional interface options. A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a>, <a href=\"/bots/features#keyboards\">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account</td>",
"rst_description": "Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account\n",
"name": "reply_markup"
},
{

View file

@ -30,9 +30,9 @@
{
"type": "Array of ReactionType",
"required": false,
"description": "New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.",
"html_description": "<td>New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.</td>",
"rst_description": "New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.\n",
"description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.",
"html_description": "<td>A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.</td>",
"rst_description": "A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.\n",
"name": "reaction"
},
{

View file

@ -34,6 +34,14 @@
"html_description": "<td>A <strong>.WEBP</strong> or <strong>.PNG</strong> image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a <strong>.TGS</strong> animation with a thumbnail up to 32 kilobytes in size (see <a href=\"/stickers#animated-sticker-requirements\"/><a href=\"https://core.telegram.org/stickers#animated-sticker-requirements\">https://core.telegram.org/stickers#animated-sticker-requirements</a> for animated sticker technical requirements), or a <strong>WEBM</strong> video with the thumbnail up to 32 kilobytes in size; see <a href=\"/stickers#video-sticker-requirements\"/><a href=\"https://core.telegram.org/stickers#video-sticker-requirements\">https://core.telegram.org/stickers#video-sticker-requirements</a> for video sticker technical requirements. Pass a <em>file_id</em> as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. <a href=\"#sending-files\">More information on Sending Files &#187;</a>. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.</td>",
"rst_description": "A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_`https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_`https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.\n",
"name": "thumbnail"
},
{
"type": "String",
"required": true,
"description": "Format of the thumbnail, must be one of 'static' for a .WEBP or .PNG image, 'animated' for a .TGS animation, or 'video' for a WEBM video",
"html_description": "<td>Format of the thumbnail, must be one of &#8220;static&#8221; for a <strong>.WEBP</strong> or <strong>.PNG</strong> image, &#8220;animated&#8221; for a <strong>.TGS</strong> animation, or &#8220;video&#8221; for a <strong>WEBM</strong> video</td>",
"rst_description": "Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **WEBM** video\n",
"name": "format"
}
],
"category": "methods"

View file

@ -7,9 +7,9 @@
"object": {
"anchor": "uploadstickerfile",
"name": "uploadStickerFile",
"description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet and addStickerToSet methods (the file can be used multiple times). Returns the uploaded File on success.",
"html_description": "<p>Use this method to upload a file with a sticker for later use in the <a href=\"#createnewstickerset\">createNewStickerSet</a> and <a href=\"#addstickertoset\">addStickerToSet</a> methods (the file can be used multiple times). Returns the uploaded <a href=\"#file\">File</a> on success.</p>",
"rst_description": "Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.",
"description": "Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success.",
"html_description": "<p>Use this method to upload a file with a sticker for later use in the <a href=\"#createnewstickerset\">createNewStickerSet</a>, <a href=\"#addstickertoset\">addStickerToSet</a>, or <a href=\"#replacestickerinset\">replaceStickerInSet</a> methods (the file can be used multiple times). Returns the uploaded <a href=\"#file\">File</a> on success.</p>",
"rst_description": "Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet`, :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, or :class:`aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.",
"annotations": [
{
"type": "Integer",

File diff suppressed because it is too large Load diff

View file

@ -83,6 +83,46 @@
"name": "active_usernames",
"required": false
},
{
"type": "Birthdate",
"description": "For private chats, the date of birth of the user. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. For private chats, the date of birth of the user. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. For private chats, the date of birth of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "birthdate",
"required": false
},
{
"type": "BusinessIntro",
"description": "For private chats with business accounts, the intro of the business. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. For private chats with business accounts, the intro of the business. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. For private chats with business accounts, the intro of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "business_intro",
"required": false
},
{
"type": "BusinessLocation",
"description": "For private chats with business accounts, the location of the business. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. For private chats with business accounts, the location of the business. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. For private chats with business accounts, the location of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "business_location",
"required": false
},
{
"type": "BusinessOpeningHours",
"description": "For private chats with business accounts, the opening hours of the business. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. For private chats with business accounts, the opening hours of the business. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. For private chats with business accounts, the opening hours of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "business_opening_hours",
"required": false
},
{
"type": "Chat",
"description": "For private chats, the personal channel of the user. Returned only in getChat.",
"html_description": "<td><em>Optional</em>. For private chats, the personal channel of the user. Returned only in <a href=\"#getchat\">getChat</a>.</td>",
"rst_description": "*Optional*. For private chats, the personal channel of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`.\n",
"name": "personal_chat",
"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.",

View file

@ -101,33 +101,33 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post messages in the channel, or access channel statistics; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, or access channel statistics; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; channels only\n",
"description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, or access channel statistics; for channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n",
"name": "can_post_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can edit messages of other users and can pin messages; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit messages of other users and can pin messages; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only\n",
"description": "True, if the administrator can edit messages of other users and can pin messages; for channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit messages of other users and can pin messages; for channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only\n",
"name": "can_edit_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to pin messages; groups and supergroups only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to pin messages; groups and supergroups only</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only\n",
"description": "True, if the user is allowed to pin messages; for groups and supergroups only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to pin messages; for groups and supergroups only</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only\n",
"name": "can_pin_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only\n",
"description": "True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only\n",
"name": "can_manage_topics",
"required": false
}

View file

@ -125,33 +125,33 @@
},
{
"type": "Boolean",
"description": "True, if the administrator can post messages in the channel, or access channel statistics; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, or access channel statistics; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; channels only\n",
"description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, or access channel statistics; for channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only\n",
"name": "can_post_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the administrator can edit messages of other users and can pin messages; channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit messages of other users and can pin messages; channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only\n",
"description": "True, if the administrator can edit messages of other users and can pin messages; for channels only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the administrator can edit messages of other users and can pin messages; for channels only</td>",
"rst_description": "*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only\n",
"name": "can_edit_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to pin messages; groups and supergroups only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to pin messages; groups and supergroups only</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only\n",
"description": "True, if the user is allowed to pin messages; for groups and supergroups only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to pin messages; for groups and supergroups only</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only\n",
"name": "can_pin_messages",
"required": false
},
{
"type": "Boolean",
"description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only\n",
"description": "True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only</td>",
"rst_description": "*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only\n",
"name": "can_manage_topics",
"required": false
},

View file

@ -7,9 +7,9 @@
"object": {
"anchor": "chatshared",
"name": "ChatShared",
"description": "This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.",
"html_description": "<p>This object contains information about the chat whose identifier was shared with the bot using a <a href=\"#keyboardbuttonrequestchat\">KeyboardButtonRequestChat</a> button.</p>",
"rst_description": "This object contains information about the chat whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.",
"description": "This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.",
"html_description": "<p>This object contains information about a chat that was shared with the bot using a <a href=\"#keyboardbuttonrequestchat\">KeyboardButtonRequestChat</a> button.</p>",
"rst_description": "This object contains information about a chat that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.",
"annotations": [
{
"type": "Integer",
@ -26,6 +26,30 @@
"rst_description": "Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.\n",
"name": "chat_id",
"required": true
},
{
"type": "String",
"description": "Title of the chat, if the title was requested by the bot.",
"html_description": "<td><em>Optional</em>. Title of the chat, if the title was requested by the bot.</td>",
"rst_description": "*Optional*. Title of the chat, if the title was requested by the bot.\n",
"name": "title",
"required": false
},
{
"type": "String",
"description": "Username of the chat, if the username was requested by the bot and available.",
"html_description": "<td><em>Optional</em>. Username of the chat, if the username was requested by the bot and available.</td>",
"rst_description": "*Optional*. Username of the chat, if the username was requested by the bot and available.\n",
"name": "username",
"required": false
},
{
"type": "Array of PhotoSize",
"description": "Available sizes of the chat photo, if the photo was requested by the bot",
"html_description": "<td><em>Optional</em>. Available sizes of the chat photo, if the photo was requested by the bot</td>",
"rst_description": "*Optional*. Available sizes of the chat photo, if the photo was requested by the bot\n",
"name": "photo",
"required": false
}
],
"category": "types"

View file

@ -21,65 +21,65 @@
},
{
"type": "String",
"description": "Base64-encoded encrypted Telegram Passport element data provided by the user, available for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Base64-encoded encrypted Telegram Passport element data provided by the user, available for &#8220;personal_details&#8221;, &#8220;passport&#8221;, &#8220;driver_license&#8221;, &#8220;identity_card&#8221;, &#8220;internal_passport&#8221; and &#8220;address&#8221; types. Can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user, available for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"description": "Base64-encoded encrypted Telegram Passport element data provided by the user; available only for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for &#8220;personal_details&#8221;, &#8220;passport&#8221;, &#8220;driver_license&#8221;, &#8220;identity_card&#8221;, &#8220;internal_passport&#8221; and &#8220;address&#8221; types. Can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"name": "data",
"required": false
},
{
"type": "String",
"description": "User's verified phone number, available only for 'phone_number' type",
"html_description": "<td><em>Optional</em>. User's verified phone number, available only for &#8220;phone_number&#8221; type</td>",
"rst_description": "*Optional*. User's verified phone number, available only for 'phone_number' type\n",
"description": "User's verified phone number; available only for 'phone_number' type",
"html_description": "<td><em>Optional</em>. User's verified phone number; available only for &#8220;phone_number&#8221; type</td>",
"rst_description": "*Optional*. User's verified phone number; available only for 'phone_number' type\n",
"name": "phone_number",
"required": false
},
{
"type": "String",
"description": "User's verified email address, available only for 'email' type",
"html_description": "<td><em>Optional</em>. User's verified email address, available only for &#8220;email&#8221; type</td>",
"rst_description": "*Optional*. User's verified email address, available only for 'email' type\n",
"description": "User's verified email address; available only for 'email' type",
"html_description": "<td><em>Optional</em>. User's verified email address; available only for &#8220;email&#8221; type</td>",
"rst_description": "*Optional*. User's verified email address; available only for 'email' type\n",
"name": "email",
"required": false
},
{
"type": "Array of PassportFile",
"description": "Array of encrypted files with documents provided by the user, available for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Array of encrypted files with documents provided by the user, available for &#8220;utility_bill&#8221;, &#8220;bank_statement&#8221;, &#8220;rental_agreement&#8221;, &#8220;passport_registration&#8221; and &#8220;temporary_registration&#8221; types. Files can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Array of encrypted files with documents provided by the user, available for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"description": "Array of encrypted files with documents provided by the user; available only for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Array of encrypted files with documents provided by the user; available only for &#8220;utility_bill&#8221;, &#8220;bank_statement&#8221;, &#8220;rental_agreement&#8221;, &#8220;passport_registration&#8221; and &#8220;temporary_registration&#8221; types. Files can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Array of encrypted files with documents provided by the user; available only for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"name": "files",
"required": false
},
{
"type": "PassportFile",
"description": "Encrypted file with the front side of the document, provided by the user. Available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Encrypted file with the front side of the document, provided by the user. Available for &#8220;passport&#8221;, &#8220;driver_license&#8221;, &#8220;identity_card&#8221; and &#8220;internal_passport&#8221;. The file can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Encrypted file with the front side of the document, provided by the user. Available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"description": "Encrypted file with the front side of the document, provided by the user; available only for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Encrypted file with the front side of the document, provided by the user; available only for &#8220;passport&#8221;, &#8220;driver_license&#8221;, &#8220;identity_card&#8221; and &#8220;internal_passport&#8221;. The file can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Encrypted file with the front side of the document, provided by the user; available only for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"name": "front_side",
"required": false
},
{
"type": "PassportFile",
"description": "Encrypted file with the reverse side of the document, provided by the user. Available for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Encrypted file with the reverse side of the document, provided by the user. Available for &#8220;driver_license&#8221; and &#8220;identity_card&#8221;. The file can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Encrypted file with the reverse side of the document, provided by the user. Available for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"description": "Encrypted file with the reverse side of the document, provided by the user; available only for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Encrypted file with the reverse side of the document, provided by the user; available only for &#8220;driver_license&#8221; and &#8220;identity_card&#8221;. The file can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Encrypted file with the reverse side of the document, provided by the user; available only for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"name": "reverse_side",
"required": false
},
{
"type": "PassportFile",
"description": "Encrypted file with the selfie of the user holding a document, provided by the user; available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Encrypted file with the selfie of the user holding a document, provided by the user; available for &#8220;passport&#8221;, &#8220;driver_license&#8221;, &#8220;identity_card&#8221; and &#8220;internal_passport&#8221;. The file can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"description": "Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for &#8220;passport&#8221;, &#8220;driver_license&#8221;, &#8220;identity_card&#8221; and &#8220;internal_passport&#8221;. The file can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"name": "selfie",
"required": false
},
{
"type": "Array of PassportFile",
"description": "Array of encrypted files with translated versions of documents provided by the user. Available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Array of encrypted files with translated versions of documents provided by the user. Available if requested for &#8220;passport&#8221;, &#8220;driver_license&#8221;, &#8220;identity_card&#8221;, &#8220;internal_passport&#8221;, &#8220;utility_bill&#8221;, &#8220;bank_statement&#8221;, &#8220;rental_agreement&#8221;, &#8220;passport_registration&#8221; and &#8220;temporary_registration&#8221; types. Files can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Array of encrypted files with translated versions of documents provided by the user. Available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"description": "Array of encrypted files with translated versions of documents provided by the user; available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying EncryptedCredentials.",
"html_description": "<td><em>Optional</em>. Array of encrypted files with translated versions of documents provided by the user; available if requested for &#8220;passport&#8221;, &#8220;driver_license&#8221;, &#8220;identity_card&#8221;, &#8220;internal_passport&#8221;, &#8220;utility_bill&#8221;, &#8220;bank_statement&#8221;, &#8220;rental_agreement&#8221;, &#8220;passport_registration&#8221; and &#8220;temporary_registration&#8221; types. Files can be decrypted and verified using the accompanying <a href=\"#encryptedcredentials\">EncryptedCredentials</a>.</td>",
"rst_description": "*Optional*. Array of encrypted files with translated versions of documents provided by the user; available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.\n",
"name": "translation",
"required": false
},

View file

@ -19,6 +19,14 @@
"name": "sticker",
"required": true
},
{
"type": "String",
"description": "Format of the added sticker, must be one of 'static' for a .WEBP or .PNG image, 'animated' for a .TGS animation, 'video' for a WEBM video",
"html_description": "<td>Format of the added sticker, must be one of &#8220;static&#8221; for a <strong>.WEBP</strong> or <strong>.PNG</strong> image, &#8220;animated&#8221; for a <strong>.TGS</strong> animation, &#8220;video&#8221; for a <strong>WEBM</strong> video</td>",
"rst_description": "Format of the added sticker, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, 'video' for a **WEBM** video\n",
"name": "format",
"required": true
},
{
"type": "Array of String",
"description": "List of 1-20 emoji associated with the sticker",

View file

@ -7,9 +7,9 @@
"object": {
"anchor": "keyboardbuttonrequestchat",
"name": "KeyboardButtonRequestChat",
"description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.",
"html_description": "<p>This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. <a href=\"/bots/features#chat-and-user-selection\">More about requesting chats &#187;</a></p>",
"rst_description": "This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. `More about requesting chats » <https://core.telegram.org/bots/features#chat-and-user-selection>`_",
"description": "This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the сhat if appropriate",
"html_description": "<p>This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the &#1089;hat if appropriate <a href=\"/bots/features#chat-and-user-selection\">More about requesting chats &#187;</a></p>",
"rst_description": "This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the сhat if appropriate `More about requesting chats » <https://core.telegram.org/bots/features#chat-and-user-selection>`_",
"annotations": [
{
"type": "Integer",
@ -74,6 +74,30 @@
"rst_description": "*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.\n",
"name": "bot_is_member",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request the chat's title",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request the chat's title</td>",
"rst_description": "*Optional*. Pass :code:`True` to request the chat's title\n",
"name": "request_title",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request the chat's username",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request the chat's username</td>",
"rst_description": "*Optional*. Pass :code:`True` to request the chat's username\n",
"name": "request_username",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request the chat's photo",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request the chat's photo</td>",
"rst_description": "*Optional*. Pass :code:`True` to request the chat's photo\n",
"name": "request_photo",
"required": false
}
],
"category": "types"

View file

@ -7,9 +7,9 @@
"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>`_",
"description": "This object defines the criteria used to request suitable users. Information about 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. Information about 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. Information about 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",
@ -42,6 +42,30 @@
"rst_description": "*Optional*. The maximum number of users to be selected; 1-10. Defaults to 1.\n",
"name": "max_quantity",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request the users' first and last name",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request the users' first and last name</td>",
"rst_description": "*Optional*. Pass :code:`True` to request the users' first and last name\n",
"name": "request_name",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request the users' username",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request the users' username</td>",
"rst_description": "*Optional*. Pass :code:`True` to request the users' username\n",
"name": "request_username",
"required": false
},
{
"type": "Boolean",
"description": "Pass True to request the users' photo",
"html_description": "<td><em>Optional</em>. Pass <em>True</em> to request the users' photo</td>",
"rst_description": "*Optional*. Pass :code:`True` to request the users' photo\n",
"name": "request_photo",
"required": false
}
],
"category": "types"

View file

@ -11,14 +11,6 @@
"html_description": "<p>This object represents a point on the map.</p>",
"rst_description": "This object represents a point on the map.",
"annotations": [
{
"type": "Float",
"description": "Longitude as defined by sender",
"html_description": "<td>Longitude as defined by sender</td>",
"rst_description": "Longitude as defined by sender\n",
"name": "longitude",
"required": true
},
{
"type": "Float",
"description": "Latitude as defined by sender",
@ -27,6 +19,14 @@
"name": "latitude",
"required": true
},
{
"type": "Float",
"description": "Longitude as defined by sender",
"html_description": "<td>Longitude as defined by sender</td>",
"rst_description": "Longitude as defined by sender\n",
"name": "longitude",
"required": true
},
{
"type": "Float",
"description": "The radius of uncertainty for the location, measured in meters; 0-1500",

View file

@ -5,6 +5,7 @@ answer:
fill: &fill-answer
chat_id: self.chat.id
message_thread_id: self.message_thread_id if self.is_topic_message else None
business_connection_id: self.business_connection_id
reply:
method: sendMessage

View file

@ -51,6 +51,14 @@
"name": "sender_boost_count",
"required": false
},
{
"type": "User",
"description": "The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.",
"html_description": "<td><em>Optional</em>. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.</td>",
"rst_description": "*Optional*. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.\n",
"name": "sender_business_bot",
"required": false
},
{
"type": "Integer",
"description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date.",
@ -59,6 +67,14 @@
"name": "date",
"required": true
},
{
"type": "String",
"description": "Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.",
"html_description": "<td><em>Optional</em>. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.</td>",
"rst_description": "*Optional*. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.\n",
"name": "business_connection_id",
"required": false
},
{
"type": "Chat",
"description": "Chat the message belongs to",
@ -147,6 +163,14 @@
"name": "has_protected_content",
"required": false
},
{
"type": "True",
"description": "True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message",
"html_description": "<td><em>Optional</em>. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message</td>",
"rst_description": "*Optional*. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message\n",
"name": "is_from_offline",
"required": false
},
{
"type": "String",
"description": "The unique identifier of a media message group this message belongs to",

View file

@ -21,17 +21,17 @@
},
{
"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",
"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). Not supported for messages sent on behalf of a business account.",
"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>). Not supported for messages sent on behalf of a business account.</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`). Not supported for messages sent on behalf of a business account.\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",
"description": "Pass True if the message should be sent even if the specified message to be replied to is not found. Always False for replies in another chat or forum topic. Always True for messages sent on behalf of a business account.",
"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. Always <em>False</em> for replies in another chat or forum topic. Always <em>True</em> for messages sent on behalf of a business account.</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. Always :code:`False` for replies in another chat or forum topic. Always :code:`True` for messages sent on behalf of a business account.\n",
"name": "allow_sending_without_reply",
"required": false
},

View file

@ -35,22 +35,6 @@
"name": "sticker_type",
"required": true
},
{
"type": "Boolean",
"description": "True, if the sticker set contains animated stickers",
"html_description": "<td><em>True</em>, if the sticker set contains <a href=\"https://telegram.org/blog/animated-stickers\">animated stickers</a></td>",
"rst_description": ":code:`True`, if the sticker set contains `animated stickers <https://telegram.org/blog/animated-stickers>`_\n",
"name": "is_animated",
"required": true
},
{
"type": "Boolean",
"description": "True, if the sticker set contains video stickers",
"html_description": "<td><em>True</em>, if the sticker set contains <a href=\"https://telegram.org/blog/video-stickers-better-reactions\">video stickers</a></td>",
"rst_description": ":code:`True`, if the sticker set contains `video stickers <https://telegram.org/blog/video-stickers-better-reactions>`_\n",
"name": "is_video",
"required": true
},
{
"type": "Array of Sticker",
"description": "List of all set stickers",
@ -66,6 +50,30 @@
"rst_description": "*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format\n",
"name": "thumbnail",
"required": false
},
{
"type": "Boolean",
"description": "True, if the sticker set contains animated stickers",
"html_description": "<td><em>True</em>, if the sticker set contains <a href=\"https://telegram.org/blog/animated-stickers\">animated stickers</a></td>",
"rst_description": ":code:`True`, if the sticker set contains `animated stickers <https://telegram.org/blog/animated-stickers>`_\n",
"name": "is_animated",
"required": false,
"deprecated": {
"version": "7.2",
"release_date": "2024-03-31"
}
},
{
"type": "Boolean",
"description": "True, if the sticker set contains video stickers",
"html_description": "<td><em>True</em>, if the sticker set contains <a href=\"https://telegram.org/blog/video-stickers-better-reactions\">video stickers</a></td>",
"rst_description": ":code:`True`, if the sticker set contains `video stickers <https://telegram.org/blog/video-stickers-better-reactions>`_\n",
"name": "is_video",
"required": false,
"deprecated": {
"version": "7.2",
"release_date": "2024-03-31"
}
}
],
"category": "types"

View file

@ -51,6 +51,38 @@
"name": "edited_channel_post",
"required": false
},
{
"type": "BusinessConnection",
"description": "The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot",
"html_description": "<td><em>Optional</em>. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot</td>",
"rst_description": "*Optional*. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot\n",
"name": "business_connection",
"required": false
},
{
"type": "Message",
"description": "New non-service message from a connected business account",
"html_description": "<td><em>Optional</em>. New non-service message from a connected business account</td>",
"rst_description": "*Optional*. New non-service message from a connected business account\n",
"name": "business_message",
"required": false
},
{
"type": "Message",
"description": "New version of a message from a connected business account",
"html_description": "<td><em>Optional</em>. New version of a message from a connected business account</td>",
"rst_description": "*Optional*. New version of a message from a connected business account\n",
"name": "edited_business_message",
"required": false
},
{
"type": "BusinessMessagesDeleted",
"description": "Messages were deleted from a connected business account",
"html_description": "<td><em>Optional</em>. Messages were deleted from a connected business account</td>",
"rst_description": "*Optional*. Messages were deleted from a connected business account\n",
"name": "deleted_business_messages",
"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.",

View file

@ -98,6 +98,14 @@
"rst_description": "*Optional*. :code:`True`, if the bot supports inline queries. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n",
"name": "supports_inline_queries",
"required": false
},
{
"type": "Boolean",
"description": "True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in <a href=\"#getme\">getMe</a>.</td>",
"rst_description": "*Optional*. :code:`True`, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in :class:`aiogram.methods.get_me.GetMe`.\n",
"name": "can_connect_to_business",
"required": false
}
],
"category": "types"

View file

@ -19,13 +19,25 @@
"name": "request_id",
"required": true
},
{
"type": "Array of SharedUser",
"description": "Information about users shared with the bot.",
"html_description": "<td>Information about users shared with the bot.</td>",
"rst_description": "Information about users shared with the bot.\n",
"name": "users",
"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
"required": false,
"deprecated": {
"version": "7.2",
"release_date": "2024-03-31"
}
}
],
"category": "types"

View file

@ -52,7 +52,7 @@ Features
- Asynchronous (`asyncio docs <https://docs.python.org/3/library/asyncio.html>`_, :pep:`492`)
- Has type hints (:pep:`484`) and can be used with `mypy <http://mypy-lang.org/>`_
- Supports `PyPy <https://www.pypy.org/>`_
- Supports `Telegram Bot API 7.1 <https://core.telegram.org/bots/api>`_ and gets fast updates to the latest versions of the Bot API
- Supports `Telegram Bot API 7.2 <https://core.telegram.org/bots/api>`_ and gets fast updates to the latest versions of the Bot API
- Telegram Bot API integration code was `autogenerated <https://github.com/aiogram/tg-codegen>`_ and can be easily re-generated when API gets updated
- Updates router (Blueprints)
- Has Finite State Machine

View file

@ -1,2 +1,2 @@
__version__ = "3.4.1"
__api_version__ = "7.1"
__version__ = "3.5.0"
__api_version__ = "7.2"

View file

@ -61,6 +61,7 @@ from ..methods import (
ExportChatInviteLink,
ForwardMessage,
ForwardMessages,
GetBusinessConnection,
GetChat,
GetChatAdministrators,
GetChatMember,
@ -88,6 +89,7 @@ from ..methods import (
PromoteChatMember,
ReopenForumTopic,
ReopenGeneralForumTopic,
ReplaceStickerInSet,
RestrictChatMember,
RevokeChatInviteLink,
SendAnimation,
@ -155,6 +157,7 @@ from ..types import (
BotDescription,
BotName,
BotShortDescription,
BusinessConnection,
Chat,
ChatAdministratorRights,
ChatInviteLink,
@ -518,7 +521,7 @@ class Bot:
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.
Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#addstickertoset
@ -1051,9 +1054,9 @@ class Bot:
name: str,
title: str,
stickers: List[InputSticker],
sticker_format: str,
sticker_type: Optional[str] = None,
needs_repainting: Optional[bool] = None,
sticker_format: Optional[str] = None,
request_timeout: Optional[int] = None,
) -> bool:
"""
@ -1065,9 +1068,9 @@ class Bot:
:param name: Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_<bot_username>"`. :code:`<bot_username>` is case insensitive. 1-64 characters.
:param title: Sticker set title, 1-64 characters
:param stickers: A JSON-serialized list of 1-50 initial stickers to be added to the sticker set
:param sticker_format: Format of stickers in the set, must be one of 'static', 'animated', 'video'
:param sticker_type: Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.
:param needs_repainting: Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only
:param sticker_format: Format of stickers in the set, must be one of 'static', 'animated', 'video'
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
@ -1077,9 +1080,9 @@ class Bot:
name=name,
title=title,
stickers=stickers,
sticker_format=sticker_format,
sticker_type=sticker_type,
needs_repainting=needs_repainting,
sticker_format=sticker_format,
)
return await self(call, request_timeout=request_timeout)
@ -1728,7 +1731,7 @@ class Bot:
Source: https://core.telegram.org/bots/api#getcustomemojistickers
:param custom_emoji_ids: List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.
:param custom_emoji_ids: A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.
:param request_timeout: Request timeout
:return: Returns an Array of :class:`aiogram.types.sticker.Sticker` objects.
"""
@ -2073,10 +2076,10 @@ class Bot:
:param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat
:param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users
:param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users
:param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; channels only
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; channels only
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages, supergroups only
:param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only
:param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only
:param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
@ -2184,6 +2187,7 @@ class Bot:
self,
chat_id: Union[int, str],
animation: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
@ -2210,6 +2214,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent animation in seconds
:param width: Animation width
@ -2222,7 +2227,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -2232,6 +2237,7 @@ class Bot:
call = SendAnimation(
chat_id=chat_id,
animation=animation,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
width=width,
@ -2254,6 +2260,7 @@ class Bot:
self,
chat_id: Union[int, str],
audio: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -2280,6 +2287,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -2291,7 +2299,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -2301,6 +2309,7 @@ class Bot:
call = SendAudio(
chat_id=chat_id,
audio=audio,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
@ -2322,6 +2331,7 @@ class Bot:
self,
chat_id: Union[int, str],
action: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
request_timeout: Optional[int] = None,
) -> bool:
@ -2336,7 +2346,8 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages <https://core.telegram.org/bots/api#sendmessage>`_, *upload_photo* for `photos <https://core.telegram.org/bots/api#sendphoto>`_, *record_video* or *upload_video* for `videos <https://core.telegram.org/bots/api#sendvideo>`_, *record_voice* or *upload_voice* for `voice notes <https://core.telegram.org/bots/api#sendvoice>`_, *upload_document* for `general files <https://core.telegram.org/bots/api#senddocument>`_, *choose_sticker* for `stickers <https://core.telegram.org/bots/api#sendsticker>`_, *find_location* for `location data <https://core.telegram.org/bots/api#sendlocation>`_, *record_video_note* or *upload_video_note* for `video notes <https://core.telegram.org/bots/api#sendvideonote>`_.
:param message_thread_id: Unique identifier for the target message thread; supergroups only
:param business_connection_id: Unique identifier of the business connection on behalf of which the action will be sent
:param message_thread_id: Unique identifier for the target message thread; for supergroups only
:param request_timeout: Request timeout
:return: The user will see a 'sending photo' status for the bot.
"""
@ -2344,6 +2355,7 @@ class Bot:
call = SendChatAction(
chat_id=chat_id,
action=action,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
)
return await self(call, request_timeout=request_timeout)
@ -2353,6 +2365,7 @@ class Bot:
chat_id: Union[int, str],
phone_number: str,
first_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
last_name: Optional[str] = None,
vcard: Optional[str] = None,
@ -2374,13 +2387,14 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param phone_number: Contact's phone number
:param first_name: Contact's first name
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard <https://en.wikipedia.org/wiki/VCard>`_, 0-2048 bytes
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -2391,6 +2405,7 @@ class Bot:
chat_id=chat_id,
phone_number=phone_number,
first_name=first_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
last_name=last_name,
vcard=vcard,
@ -2406,6 +2421,7 @@ class Bot:
async def send_dice(
self,
chat_id: Union[int, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
@ -2424,12 +2440,13 @@ class Bot:
Source: https://core.telegram.org/bots/api#senddice
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '', and values 1-64 for '🎰'. Defaults to '🎲'
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -2438,6 +2455,7 @@ class Bot:
call = SendDice(
chat_id=chat_id,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
@ -2453,6 +2471,7 @@ class Bot:
self,
chat_id: Union[int, str],
document: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
caption: Optional[str] = None,
@ -2476,6 +2495,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
@ -2485,7 +2505,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -2495,6 +2515,7 @@ class Bot:
call = SendDocument(
chat_id=chat_id,
document=document,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
thumbnail=thumbnail,
caption=caption,
@ -2514,6 +2535,7 @@ class Bot:
self,
chat_id: int,
game_short_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
@ -2530,11 +2552,12 @@ class Bot:
:param chat_id: Unique identifier for the target chat
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather <https://t.me/botfather>`_.
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -2544,6 +2567,7 @@ class Bot:
call = SendGame(
chat_id=chat_id,
game_short_name=game_short_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
@ -2663,6 +2687,7 @@ class Bot:
chat_id: Union[int, str],
latitude: float,
longitude: float,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None,
@ -2686,6 +2711,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param latitude: Latitude of the location
:param longitude: Longitude of the location
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds for which the location will be updated (see `Live Locations <https://telegram.org/blog/live-locations>`_, should be between 60 and 86400.
@ -2694,7 +2720,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -2705,6 +2731,7 @@ class Bot:
chat_id=chat_id,
latitude=latitude,
longitude=longitude,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
horizontal_accuracy=horizontal_accuracy,
live_period=live_period,
@ -2723,6 +2750,7 @@ class Bot:
self,
chat_id: Union[int, str],
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
@ -2738,6 +2766,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param disable_notification: Sends messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@ -2751,6 +2780,7 @@ class Bot:
call = SendMediaGroup(
chat_id=chat_id,
media=media,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
@ -2764,6 +2794,7 @@ class Bot:
self,
chat_id: Union[int, str],
text: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
entities: Optional[List[MessageEntity]] = None,
@ -2790,6 +2821,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param parse_mode: Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
@ -2797,7 +2829,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param disable_web_page_preview: Disables link previews for links in this message
:param reply_to_message_id: If the message is a reply, ID of the original message
@ -2808,6 +2840,7 @@ class Bot:
call = SendMessage(
chat_id=chat_id,
text=text,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
parse_mode=parse_mode,
entities=entities,
@ -2826,6 +2859,7 @@ class Bot:
self,
chat_id: Union[int, str],
photo: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -2848,6 +2882,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -2856,7 +2891,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -2866,6 +2901,7 @@ class Bot:
call = SendPhoto(
chat_id=chat_id,
photo=photo,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
@ -2885,6 +2921,7 @@ class Bot:
chat_id: Union[int, str],
question: str,
options: List[str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
is_anonymous: Optional[bool] = None,
type: Optional[str] = None,
@ -2914,6 +2951,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
:param type: Poll type, 'quiz' or 'regular', defaults to 'regular'
@ -2928,7 +2966,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -2939,6 +2977,7 @@ class Bot:
chat_id=chat_id,
question=question,
options=options,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
is_anonymous=is_anonymous,
type=type,
@ -2963,6 +3002,7 @@ class Bot:
self,
chat_id: Union[int, str],
sticker: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
@ -2981,13 +3021,14 @@ class Bot:
Source: https://core.telegram.org/bots/api#sendsticker
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL.
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -2997,6 +3038,7 @@ class Bot:
call = SendSticker(
chat_id=chat_id,
sticker=sticker,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
@ -3015,6 +3057,7 @@ class Bot:
longitude: float,
title: str,
address: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
foursquare_id: Optional[str] = None,
foursquare_type: Optional[str] = None,
@ -3040,6 +3083,7 @@ class Bot:
:param longitude: Longitude of the venue
:param title: Name of the venue
:param address: Address of the venue
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
@ -3048,7 +3092,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -3061,6 +3105,7 @@ class Bot:
longitude=longitude,
title=title,
address=address,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
foursquare_id=foursquare_id,
foursquare_type=foursquare_type,
@ -3079,6 +3124,7 @@ class Bot:
self,
chat_id: Union[int, str],
video: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
@ -3106,6 +3152,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent video in seconds
:param width: Video width
@ -3119,7 +3166,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -3129,6 +3176,7 @@ class Bot:
call = SendVideo(
chat_id=chat_id,
video=video,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
width=width,
@ -3152,6 +3200,7 @@ class Bot:
self,
chat_id: Union[int, str],
video_note: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
length: Optional[int] = None,
@ -3173,6 +3222,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
@ -3180,7 +3230,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -3190,6 +3240,7 @@ class Bot:
call = SendVideoNote(
chat_id=chat_id,
video_note=video_note,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
length=length,
@ -3207,6 +3258,7 @@ class Bot:
self,
chat_id: Union[int, str],
voice: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -3229,6 +3281,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -3237,7 +3290,7 @@ class Bot:
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:param request_timeout: Request timeout
@ -3247,6 +3300,7 @@ class Bot:
call = SendVoice(
chat_id=chat_id,
voice=voice,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
@ -3812,7 +3866,7 @@ class Bot:
request_timeout: Optional[int] = None,
) -> File:
"""
Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.
Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet`, :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, or :class:`aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.
Source: https://core.telegram.org/bots/api#uploadstickerfile
@ -4135,6 +4189,7 @@ class Bot:
self,
name: str,
user_id: int,
format: str,
thumbnail: Optional[Union[InputFile, str]] = None,
request_timeout: Optional[int] = None,
) -> bool:
@ -4145,6 +4200,7 @@ class Bot:
:param name: Sticker set name
:param user_id: User identifier of the sticker set owner
:param format: Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **WEBM** video
:param thumbnail: A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_`https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_`https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
@ -4153,6 +4209,7 @@ class Bot:
call = SetStickerSetThumbnail(
name=name,
user_id=user_id,
format=format,
thumbnail=thumbnail,
)
return await self(call, request_timeout=request_timeout)
@ -4261,7 +4318,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param from_chat_id: Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)
:param message_ids: Identifiers of 1-100 messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order.
:param message_ids: A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order.
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param disable_notification: Sends the messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@ -4293,7 +4350,7 @@ class Bot:
Source: https://core.telegram.org/bots/api#deletemessages
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param message_ids: Identifiers of 1-100 messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted
:param message_ids: A JSON-serialized list of 1-100 identifiers of messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
@ -4321,7 +4378,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param from_chat_id: Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)
:param message_ids: Identifiers of 1-100 messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order.
:param message_ids: A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order.
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param disable_notification: Sends the messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the forwarded messages from forwarding and saving
@ -4377,7 +4434,7 @@ class Bot:
:param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)
:param message_id: Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.
:param reaction: New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.
:param reaction: A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.
:param is_big: Pass :code:`True` to set the reaction with a big animation
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
@ -4390,3 +4447,52 @@ class Bot:
is_big=is_big,
)
return await self(call, request_timeout=request_timeout)
async def get_business_connection(
self,
business_connection_id: str,
request_timeout: Optional[int] = None,
) -> BusinessConnection:
"""
Use this method to get information about the connection of the bot with a business account. Returns a :class:`aiogram.types.business_connection.BusinessConnection` object on success.
Source: https://core.telegram.org/bots/api#getbusinessconnection
:param business_connection_id: Unique identifier of the business connection
:param request_timeout: Request timeout
:return: Returns a :class:`aiogram.types.business_connection.BusinessConnection` object on success.
"""
call = GetBusinessConnection(
business_connection_id=business_connection_id,
)
return await self(call, request_timeout=request_timeout)
async def replace_sticker_in_set(
self,
user_id: int,
name: str,
old_sticker: str,
sticker: InputSticker,
request_timeout: Optional[int] = None,
) -> bool:
"""
Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling :class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet`, then :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, then :class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet`. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#replacestickerinset
:param user_id: User identifier of the sticker set owner
:param name: Sticker set name
:param old_sticker: File identifier of the replaced sticker
:param sticker: A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.
:param request_timeout: Request timeout
:return: Returns :code:`True` on success.
"""
call = ReplaceStickerInSet(
user_id=user_id,
name=name,
old_sticker=old_sticker,
sticker=sticker,
)
return await self(call, request_timeout=request_timeout)

View file

@ -86,4 +86,20 @@ class UserContextMiddleware(BaseMiddleware):
return event.chat_boost.chat, None, None
if event.removed_chat_boost:
return event.removed_chat_boost.chat, None, None
if event.business_message:
return (
event.business_message.chat,
event.business_message.from_user,
event.business_message.message_thread_id
if event.business_message.is_topic_message
else None,
)
if event.edited_business_message:
return (
event.edited_business_message.chat,
event.edited_business_message.from_user,
event.edited_business_message.message_thread_id
if event.edited_business_message.is_topic_message
else None,
)
return None, None, None

View file

@ -60,6 +60,16 @@ class Router:
self.removed_chat_boost = TelegramEventObserver(
router=self, event_name="removed_chat_boost"
)
self.deleted_business_messages = TelegramEventObserver(
router=self, event_name="deleted_business_messages"
)
self.business_connection = TelegramEventObserver(
router=self, event_name="business_connection"
)
self.edited_business_message = TelegramEventObserver(
router=self, event_name="edited_business_message"
)
self.business_message = TelegramEventObserver(router=self, event_name="business_message")
self.errors = self.error = TelegramEventObserver(router=self, event_name="error")
@ -85,6 +95,10 @@ class Router:
"message_reaction_count": self.message_reaction_count,
"chat_boost": self.chat_boost,
"removed_chat_boost": self.removed_chat_boost,
"deleted_business_messages": self.deleted_business_messages,
"business_connection": self.business_connection,
"edited_business_message": self.edited_business_message,
"business_message": self.business_message,
"error": self.errors,
}

View file

@ -62,3 +62,6 @@ class ContentType(str, Enum):
VIDEO_CHAT_PARTICIPANTS_INVITED = "video_chat_participants_invited"
WEB_APP_DATA = "web_app_data"
USER_SHARED = "user_shared"
BUSINESS_CONNECTION_ID = "business_connection_id"
SENDER_BUSINESS_BOT = "sender_business_bot"
IS_FROM_OFFLINE = "is_from_offline"

View file

@ -12,6 +12,10 @@ class UpdateType(str, Enum):
EDITED_MESSAGE = "edited_message"
CHANNEL_POST = "channel_post"
EDITED_CHANNEL_POST = "edited_channel_post"
BUSINESS_CONNECTION = "business_connection"
BUSINESS_MESSAGE = "business_message"
EDITED_BUSINESS_MESSAGE = "edited_business_message"
DELETED_BUSINESS_MESSAGES = "deleted_business_messages"
MESSAGE_REACTION = "message_reaction"
MESSAGE_REACTION_COUNT = "message_reaction_count"
INLINE_QUERY = "inline_query"

View file

@ -38,6 +38,7 @@ from .edit_message_text import EditMessageText
from .export_chat_invite_link import ExportChatInviteLink
from .forward_message import ForwardMessage
from .forward_messages import ForwardMessages
from .get_business_connection import GetBusinessConnection
from .get_chat import GetChat
from .get_chat_administrators import GetChatAdministrators
from .get_chat_member import GetChatMember
@ -65,6 +66,7 @@ from .pin_chat_message import PinChatMessage
from .promote_chat_member import PromoteChatMember
from .reopen_forum_topic import ReopenForumTopic
from .reopen_general_forum_topic import ReopenGeneralForumTopic
from .replace_sticker_in_set import ReplaceStickerInSet
from .restrict_chat_member import RestrictChatMember
from .revoke_chat_invite_link import RevokeChatInviteLink
from .send_animation import SendAnimation
@ -159,6 +161,7 @@ __all__ = (
"ExportChatInviteLink",
"ForwardMessage",
"ForwardMessages",
"GetBusinessConnection",
"GetChat",
"GetChatAdministrators",
"GetChatMember",
@ -186,6 +189,7 @@ __all__ = (
"PromoteChatMember",
"ReopenForumTopic",
"ReopenGeneralForumTopic",
"ReplaceStickerInSet",
"Request",
"Response",
"RestrictChatMember",

View file

@ -8,7 +8,7 @@ from .base import TelegramMethod
class AddStickerToSet(TelegramMethod[bool]):
"""
Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns :code:`True` on success.
Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#addstickertoset
"""

View file

@ -19,7 +19,7 @@ class CopyMessages(TelegramMethod[List[MessageId]]):
from_chat_id: Union[int, str]
"""Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)"""
message_ids: List[int]
"""Identifiers of 1-100 messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order."""
"""A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order."""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
disable_notification: Optional[bool] = None

View file

@ -2,6 +2,8 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Any, List, Optional
from pydantic import Field
from ..types import InputSticker
from .base import TelegramMethod
@ -24,12 +26,15 @@ class CreateNewStickerSet(TelegramMethod[bool]):
"""Sticker set title, 1-64 characters"""
stickers: List[InputSticker]
"""A JSON-serialized list of 1-50 initial stickers to be added to the sticker set"""
sticker_format: str
"""Format of stickers in the set, must be one of 'static', 'animated', 'video'"""
sticker_type: Optional[str] = None
"""Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created."""
needs_repainting: Optional[bool] = None
"""Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only"""
sticker_format: Optional[str] = Field(None, json_schema_extra={"deprecated": True})
"""Format of stickers in the set, must be one of 'static', 'animated', 'video'
.. deprecated:: API:7.2
https://core.telegram.org/bots/api-changelog#march-31-2024"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@ -42,9 +47,9 @@ class CreateNewStickerSet(TelegramMethod[bool]):
name: str,
title: str,
stickers: List[InputSticker],
sticker_format: str,
sticker_type: Optional[str] = None,
needs_repainting: Optional[bool] = None,
sticker_format: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
@ -56,8 +61,8 @@ class CreateNewStickerSet(TelegramMethod[bool]):
name=name,
title=title,
stickers=stickers,
sticker_format=sticker_format,
sticker_type=sticker_type,
needs_repainting=needs_repainting,
sticker_format=sticker_format,
**__pydantic_kwargs,
)

View file

@ -16,7 +16,7 @@ class DeleteMessages(TelegramMethod[bool]):
chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
message_ids: List[int]
"""Identifiers of 1-100 messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted"""
"""A JSON-serialized list of 1-100 identifiers of messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -19,7 +19,7 @@ class ForwardMessages(TelegramMethod[List[MessageId]]):
from_chat_id: Union[int, str]
"""Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)"""
message_ids: List[int]
"""Identifiers of 1-100 messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order."""
"""A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order."""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
disable_notification: Optional[bool] = None

View file

@ -0,0 +1,34 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any
from aiogram.types import BusinessConnection
from .base import TelegramMethod
class GetBusinessConnection(TelegramMethod[BusinessConnection]):
"""
Use this method to get information about the connection of the bot with a business account. Returns a :class:`aiogram.types.business_connection.BusinessConnection` object on success.
Source: https://core.telegram.org/bots/api#getbusinessconnection
"""
__returning__ = BusinessConnection
__api_method__ = "getBusinessConnection"
business_connection_id: str
"""Unique identifier of the business connection"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, business_connection_id: str, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(business_connection_id=business_connection_id, **__pydantic_kwargs)

View file

@ -17,7 +17,7 @@ class GetCustomEmojiStickers(TelegramMethod[List[Sticker]]):
__api_method__ = "getCustomEmojiStickers"
custom_emoji_ids: List[str]
"""List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified."""
"""A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -42,13 +42,13 @@ class PromoteChatMember(TelegramMethod[bool]):
can_delete_stories: Optional[bool] = None
"""Pass :code:`True` if the administrator can delete stories posted by other users"""
can_post_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; channels only"""
"""Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only"""
can_edit_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can edit messages of other users and can pin messages; channels only"""
"""Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only"""
can_pin_messages: Optional[bool] = None
"""Pass :code:`True` if the administrator can pin messages, supergroups only"""
"""Pass :code:`True` if the administrator can pin messages; for supergroups only"""
can_manage_topics: Optional[bool] = None
"""Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only"""
"""Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -0,0 +1,51 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any
from ..types import InputSticker
from .base import TelegramMethod
class ReplaceStickerInSet(TelegramMethod[bool]):
"""
Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling :class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet`, then :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, then :class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet`. Returns :code:`True` on success.
Source: https://core.telegram.org/bots/api#replacestickerinset
"""
__returning__ = bool
__api_method__ = "replaceStickerInSet"
user_id: int
"""User identifier of the sticker set owner"""
name: str
"""Sticker set name"""
old_sticker: str
"""File identifier of the replaced sticker"""
sticker: InputSticker
"""A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
user_id: int,
name: str,
old_sticker: str,
sticker: InputSticker,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
user_id=user_id,
name=name,
old_sticker=old_sticker,
sticker=sticker,
**__pydantic_kwargs,
)

View file

@ -33,6 +33,8 @@ class SendAnimation(TelegramMethod[Message]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
animation: Union[InputFile, str]
"""Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
duration: Optional[int] = None
@ -60,7 +62,7 @@ class SendAnimation(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -83,6 +85,7 @@ class SendAnimation(TelegramMethod[Message]):
*,
chat_id: Union[int, str],
animation: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
@ -109,6 +112,7 @@ class SendAnimation(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
animation=animation,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
width=width,

View file

@ -33,6 +33,8 @@ class SendAudio(TelegramMethod[Message]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
audio: Union[InputFile, str]
"""Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
caption: Optional[str] = None
@ -58,7 +60,7 @@ class SendAudio(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -81,6 +83,7 @@ class SendAudio(TelegramMethod[Message]):
*,
chat_id: Union[int, str],
audio: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -106,6 +109,7 @@ class SendAudio(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
audio=audio,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,

View file

@ -23,8 +23,10 @@ class SendChatAction(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
action: str
"""Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages <https://core.telegram.org/bots/api#sendmessage>`_, *upload_photo* for `photos <https://core.telegram.org/bots/api#sendphoto>`_, *record_video* or *upload_video* for `videos <https://core.telegram.org/bots/api#sendvideo>`_, *record_voice* or *upload_voice* for `voice notes <https://core.telegram.org/bots/api#sendvoice>`_, *upload_document* for `general files <https://core.telegram.org/bots/api#senddocument>`_, *choose_sticker* for `stickers <https://core.telegram.org/bots/api#sendsticker>`_, *find_location* for `location data <https://core.telegram.org/bots/api#sendlocation>`_, *record_video_note* or *upload_video_note* for `video notes <https://core.telegram.org/bots/api#sendvideonote>`_."""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the action will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread; supergroups only"""
"""Unique identifier for the target message thread; for supergroups only"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
@ -35,6 +37,7 @@ class SendChatAction(TelegramMethod[bool]):
*,
chat_id: Union[int, str],
action: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
@ -45,6 +48,7 @@ class SendChatAction(TelegramMethod[bool]):
super().__init__(
chat_id=chat_id,
action=action,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
**__pydantic_kwargs,
)

View file

@ -32,6 +32,8 @@ class SendContact(TelegramMethod[Message]):
"""Contact's phone number"""
first_name: str
"""Contact's first name"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
last_name: Optional[str] = None
@ -47,7 +49,7 @@ class SendContact(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -71,6 +73,7 @@ class SendContact(TelegramMethod[Message]):
chat_id: Union[int, str],
phone_number: str,
first_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
last_name: Optional[str] = None,
vcard: Optional[str] = None,
@ -92,6 +95,7 @@ class SendContact(TelegramMethod[Message]):
chat_id=chat_id,
phone_number=phone_number,
first_name=first_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
last_name=last_name,
vcard=vcard,

View file

@ -28,6 +28,8 @@ class SendDice(TelegramMethod[Message]):
chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
emoji: Optional[str] = None
@ -41,7 +43,7 @@ class SendDice(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -63,6 +65,7 @@ class SendDice(TelegramMethod[Message]):
__pydantic__self__,
*,
chat_id: Union[int, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
@ -81,6 +84,7 @@ class SendDice(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,

View file

@ -33,6 +33,8 @@ class SendDocument(TelegramMethod[Message]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
document: Union[InputFile, str]
"""File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
thumbnail: Optional[InputFile] = None
@ -54,7 +56,7 @@ class SendDocument(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -77,6 +79,7 @@ class SendDocument(TelegramMethod[Message]):
*,
chat_id: Union[int, str],
document: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
caption: Optional[str] = None,
@ -100,6 +103,7 @@ class SendDocument(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
document=document,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
thumbnail=thumbnail,
caption=caption,

View file

@ -23,6 +23,8 @@ class SendGame(TelegramMethod[Message]):
"""Unique identifier for the target chat"""
game_short_name: str
"""Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather <https://t.me/botfather>`_."""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
disable_notification: Optional[bool] = None
@ -32,7 +34,7 @@ class SendGame(TelegramMethod[Message]):
reply_parameters: Optional[ReplyParameters] = None
"""Description of the message to reply to"""
reply_markup: Optional[InlineKeyboardMarkup] = None
"""A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game."""
"""A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account."""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -55,6 +57,7 @@ class SendGame(TelegramMethod[Message]):
*,
chat_id: int,
game_short_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
@ -71,6 +74,7 @@ class SendGame(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
game_short_name=game_short_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,

View file

@ -32,6 +32,8 @@ class SendLocation(TelegramMethod[Message]):
"""Latitude of the location"""
longitude: float
"""Longitude of the location"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
horizontal_accuracy: Optional[float] = None
@ -51,7 +53,7 @@ class SendLocation(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -75,6 +77,7 @@ class SendLocation(TelegramMethod[Message]):
chat_id: Union[int, str],
latitude: float,
longitude: float,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None,
@ -98,6 +101,7 @@ class SendLocation(TelegramMethod[Message]):
chat_id=chat_id,
latitude=latitude,
longitude=longitude,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
horizontal_accuracy=horizontal_accuracy,
live_period=live_period,

View file

@ -6,11 +6,15 @@ from pydantic import Field
from ..client.default import Default
from ..types import (
ForceReply,
InlineKeyboardMarkup,
InputMediaAudio,
InputMediaDocument,
InputMediaPhoto,
InputMediaVideo,
Message,
ReplyKeyboardMarkup,
ReplyKeyboardRemove,
ReplyParameters,
)
from .base import TelegramMethod
@ -30,6 +34,8 @@ class SendMediaGroup(TelegramMethod[List[Message]]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]]
"""A JSON-serialized array describing messages to be sent, must include 2-10 items"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
disable_notification: Optional[bool] = None
@ -62,6 +68,7 @@ class SendMediaGroup(TelegramMethod[List[Message]]):
media: List[
Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]
],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
@ -77,6 +84,7 @@ class SendMediaGroup(TelegramMethod[List[Message]]):
super().__init__(
chat_id=chat_id,
media=media,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,

View file

@ -32,6 +32,8 @@ class SendMessage(TelegramMethod[Message]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
text: str
"""Text of the message to be sent, 1-4096 characters after entities parsing"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
parse_mode: Optional[Union[str, Default]] = Default("parse_mode")
@ -49,7 +51,7 @@ class SendMessage(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -79,6 +81,7 @@ class SendMessage(TelegramMethod[Message]):
*,
chat_id: Union[int, str],
text: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
entities: Optional[List[MessageEntity]] = None,
@ -105,6 +108,7 @@ class SendMessage(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
text=text,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
parse_mode=parse_mode,
entities=entities,

View file

@ -33,6 +33,8 @@ class SendPhoto(TelegramMethod[Message]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
photo: Union[InputFile, str]
"""Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » <sending-files>`"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
caption: Optional[str] = None
@ -52,7 +54,7 @@ class SendPhoto(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -75,6 +77,7 @@ class SendPhoto(TelegramMethod[Message]):
*,
chat_id: Union[int, str],
photo: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -97,6 +100,7 @@ class SendPhoto(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
photo=photo,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,

View file

@ -35,6 +35,8 @@ class SendPoll(TelegramMethod[Message]):
"""Poll question, 1-300 characters"""
options: List[str]
"""A JSON-serialized list of answer options, 2-10 strings 1-100 characters each"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
is_anonymous: Optional[bool] = None
@ -66,7 +68,7 @@ class SendPoll(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -90,6 +92,7 @@ class SendPoll(TelegramMethod[Message]):
chat_id: Union[int, str],
question: str,
options: List[str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
is_anonymous: Optional[bool] = None,
type: Optional[str] = None,
@ -119,6 +122,7 @@ class SendPoll(TelegramMethod[Message]):
chat_id=chat_id,
question=question,
options=options,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
is_anonymous=is_anonymous,
type=type,

View file

@ -30,7 +30,9 @@ class SendSticker(TelegramMethod[Message]):
chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
sticker: Union[InputFile, str]
"""Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL."""
"""Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL."""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
emoji: Optional[str] = None
@ -44,7 +46,7 @@ class SendSticker(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account."""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -67,6 +69,7 @@ class SendSticker(TelegramMethod[Message]):
*,
chat_id: Union[int, str],
sticker: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
@ -86,6 +89,7 @@ class SendSticker(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
sticker=sticker,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,

View file

@ -36,6 +36,8 @@ class SendVenue(TelegramMethod[Message]):
"""Name of the venue"""
address: str
"""Address of the venue"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
foursquare_id: Optional[str] = None
@ -55,7 +57,7 @@ class SendVenue(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -81,6 +83,7 @@ class SendVenue(TelegramMethod[Message]):
longitude: float,
title: str,
address: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
foursquare_id: Optional[str] = None,
foursquare_type: Optional[str] = None,
@ -106,6 +109,7 @@ class SendVenue(TelegramMethod[Message]):
longitude=longitude,
title=title,
address=address,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
foursquare_id=foursquare_id,
foursquare_type=foursquare_type,

View file

@ -33,6 +33,8 @@ class SendVideo(TelegramMethod[Message]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
video: Union[InputFile, str]
"""Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
duration: Optional[int] = None
@ -62,7 +64,7 @@ class SendVideo(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -85,6 +87,7 @@ class SendVideo(TelegramMethod[Message]):
*,
chat_id: Union[int, str],
video: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
@ -112,6 +115,7 @@ class SendVideo(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
video=video,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
width=width,

View file

@ -31,6 +31,8 @@ class SendVideoNote(TelegramMethod[Message]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
video_note: Union[InputFile, str]
"""Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
duration: Optional[int] = None
@ -48,7 +50,7 @@ class SendVideoNote(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -71,6 +73,7 @@ class SendVideoNote(TelegramMethod[Message]):
*,
chat_id: Union[int, str],
video_note: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
length: Optional[int] = None,
@ -92,6 +95,7 @@ class SendVideoNote(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
video_note=video_note,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
length=length,

View file

@ -33,6 +33,8 @@ class SendVoice(TelegramMethod[Message]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
voice: Union[InputFile, str]
"""Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`"""
business_connection_id: Optional[str] = None
"""Unique identifier of the business connection on behalf of which the message will be sent"""
message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"""
caption: Optional[str] = None
@ -52,7 +54,7 @@ class SendVoice(TelegramMethod[Message]):
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account"""
allow_sending_without_reply: Optional[bool] = Field(
None, json_schema_extra={"deprecated": True}
)
@ -75,6 +77,7 @@ class SendVoice(TelegramMethod[Message]):
*,
chat_id: Union[int, str],
voice: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -97,6 +100,7 @@ class SendVoice(TelegramMethod[Message]):
super().__init__(
chat_id=chat_id,
voice=voice,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,

View file

@ -19,7 +19,7 @@ class SetMessageReaction(TelegramMethod[bool]):
message_id: int
"""Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead."""
reaction: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None
"""New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators."""
"""A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators."""
is_big: Optional[bool] = None
"""Pass :code:`True` to set the reaction with a big animation"""

View file

@ -20,6 +20,8 @@ class SetStickerSetThumbnail(TelegramMethod[bool]):
"""Sticker set name"""
user_id: int
"""User identifier of the sticker set owner"""
format: str
"""Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **WEBM** video"""
thumbnail: Optional[Union[InputFile, str]] = None
"""A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_`https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_`https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail."""
@ -32,6 +34,7 @@ class SetStickerSetThumbnail(TelegramMethod[bool]):
*,
name: str,
user_id: int,
format: str,
thumbnail: Optional[Union[InputFile, str]] = None,
**__pydantic_kwargs: Any,
) -> None:
@ -39,4 +42,6 @@ class SetStickerSetThumbnail(TelegramMethod[bool]):
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(name=name, user_id=user_id, thumbnail=thumbnail, **__pydantic_kwargs)
super().__init__(
name=name, user_id=user_id, format=format, thumbnail=thumbnail, **__pydantic_kwargs
)

View file

@ -8,7 +8,7 @@ from .base import TelegramMethod
class UploadStickerFile(TelegramMethod[File]):
"""
Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet` and :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.
Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet`, :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, or :class:`aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success.
Source: https://core.telegram.org/bots/api#uploadstickerfile
"""

View file

@ -3,6 +3,7 @@ from typing import List, Literal, Optional, Union
from .animation import Animation
from .audio import Audio
from .base import UNSET_PARSE_MODE, TelegramObject
from .birthdate import Birthdate
from .bot_command import BotCommand
from .bot_command_scope import BotCommandScope
from .bot_command_scope_all_chat_administrators import (
@ -17,6 +18,12 @@ from .bot_command_scope_default import BotCommandScopeDefault
from .bot_description import BotDescription
from .bot_name import BotName
from .bot_short_description import BotShortDescription
from .business_connection import BusinessConnection
from .business_intro import BusinessIntro
from .business_location import BusinessLocation
from .business_messages_deleted import BusinessMessagesDeleted
from .business_opening_hours import BusinessOpeningHours
from .business_opening_hours_interval import BusinessOpeningHoursInterval
from .callback_game import CallbackGame
from .callback_query import CallbackQuery
from .chat import Chat
@ -165,6 +172,7 @@ from .reply_keyboard_remove import ReplyKeyboardRemove
from .reply_parameters import ReplyParameters
from .response_parameters import ResponseParameters
from .sent_web_app_message import SentWebAppMessage
from .shared_user import SharedUser
from .shipping_address import ShippingAddress
from .shipping_option import ShippingOption
from .shipping_query import ShippingQuery
@ -196,6 +204,7 @@ from .write_access_allowed import WriteAccessAllowed
__all__ = (
"Animation",
"Audio",
"Birthdate",
"BotCommand",
"BotCommandScope",
"BotCommandScopeAllChatAdministrators",
@ -209,6 +218,12 @@ __all__ = (
"BotName",
"BotShortDescription",
"BufferedInputFile",
"BusinessConnection",
"BusinessIntro",
"BusinessLocation",
"BusinessMessagesDeleted",
"BusinessOpeningHours",
"BusinessOpeningHoursInterval",
"CallbackGame",
"CallbackQuery",
"Chat",
@ -357,6 +372,7 @@ __all__ = (
"ReplyParameters",
"ResponseParameters",
"SentWebAppMessage",
"SharedUser",
"ShippingAddress",
"ShippingOption",
"ShippingQuery",

View file

@ -0,0 +1,38 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
class Birthdate(TelegramObject):
"""
Source: https://core.telegram.org/bots/api#birthdate
"""
day: int
"""Day of the user's birth; 1-31"""
month: int
"""Month of the user's birth; 1-12"""
year: Optional[int] = None
"""*Optional*. Year of the user's birth"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
day: int,
month: int,
year: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(day=day, month=month, year=year, **__pydantic_kwargs)

View file

@ -0,0 +1,58 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any
from .base import TelegramObject
if TYPE_CHECKING:
from .user import User
class BusinessConnection(TelegramObject):
"""
Describes the connection of the bot with a business account.
Source: https://core.telegram.org/bots/api#businessconnection
"""
id: str
"""Unique identifier of the business connection"""
user: User
"""Business account user that created the business connection"""
user_chat_id: int
"""Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier."""
date: int
"""Date the connection was established in Unix time"""
can_reply: bool
"""True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours"""
is_enabled: bool
"""True, if the connection is active"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
id: str,
user: User,
user_chat_id: int,
date: int,
can_reply: bool,
is_enabled: bool,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
id=id,
user=user,
user_chat_id=user_chat_id,
date=date,
can_reply=can_reply,
is_enabled=is_enabled,
**__pydantic_kwargs,
)

View file

@ -0,0 +1,41 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
if TYPE_CHECKING:
from .sticker import Sticker
class BusinessIntro(TelegramObject):
"""
Source: https://core.telegram.org/bots/api#businessintro
"""
title: Optional[str] = None
"""*Optional*. Title text of the business intro"""
message: Optional[str] = None
"""*Optional*. Message text of the business intro"""
sticker: Optional[Sticker] = None
"""*Optional*. Sticker of the business intro"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
title: Optional[str] = None,
message: Optional[str] = None,
sticker: Optional[Sticker] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(title=title, message=message, sticker=sticker, **__pydantic_kwargs)

View file

@ -0,0 +1,38 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramObject
if TYPE_CHECKING:
from .location import Location
class BusinessLocation(TelegramObject):
"""
Source: https://core.telegram.org/bots/api#businesslocation
"""
address: str
"""Address of the business"""
location: Optional[Location] = None
"""*Optional*. Location of the business"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
address: str,
location: Optional[Location] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(address=address, location=location, **__pydantic_kwargs)

View file

@ -0,0 +1,46 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, List
from .base import TelegramObject
if TYPE_CHECKING:
from .chat import Chat
class BusinessMessagesDeleted(TelegramObject):
"""
This object is received when messages are deleted from a connected business account.
Source: https://core.telegram.org/bots/api#businessmessagesdeleted
"""
business_connection_id: str
"""Unique identifier of the business connection"""
chat: Chat
"""Information about a chat in the business account. The bot may not have access to the chat or the corresponding user."""
message_ids: List[int]
"""A JSON-serialized list of identifiers of deleted messages in the chat of the business account"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
business_connection_id: str,
chat: Chat,
message_ids: List[int],
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
business_connection_id=business_connection_id,
chat=chat,
message_ids=message_ids,
**__pydantic_kwargs,
)

View file

@ -0,0 +1,40 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any, List
from .base import TelegramObject
if TYPE_CHECKING:
from .business_opening_hours_interval import BusinessOpeningHoursInterval
class BusinessOpeningHours(TelegramObject):
"""
Source: https://core.telegram.org/bots/api#businessopeninghours
"""
time_zone_name: str
"""Unique name of the time zone for which the opening hours are defined"""
opening_hours: List[BusinessOpeningHoursInterval]
"""List of time intervals describing business opening hours"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
time_zone_name: str,
opening_hours: List[BusinessOpeningHoursInterval],
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
time_zone_name=time_zone_name, opening_hours=opening_hours, **__pydantic_kwargs
)

View file

@ -0,0 +1,37 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Any
from .base import TelegramObject
class BusinessOpeningHoursInterval(TelegramObject):
"""
Source: https://core.telegram.org/bots/api#businessopeninghoursinterval
"""
opening_minute: int
"""The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60"""
closing_minute: int
"""The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
opening_minute: int,
closing_minute: int,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
opening_minute=opening_minute, closing_minute=closing_minute, **__pydantic_kwargs
)

View file

@ -37,6 +37,10 @@ if TYPE_CHECKING:
UnpinAllGeneralForumTopicMessages,
UnpinChatMessage,
)
from .birthdate import Birthdate
from .business_intro import BusinessIntro
from .business_location import BusinessLocation
from .business_opening_hours import BusinessOpeningHours
from .chat_location import ChatLocation
from .chat_permissions import ChatPermissions
from .chat_photo import ChatPhoto
@ -71,6 +75,16 @@ class Chat(TelegramObject):
"""*Optional*. Chat photo. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
active_usernames: Optional[List[str]] = None
"""*Optional*. If non-empty, the list of all `active chat usernames <https://telegram.org/blog/topics-in-groups-collectible-usernames#collectible-usernames>`_; for private chats, supergroups and channels. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
birthdate: Optional[Birthdate] = None
"""*Optional*. For private chats, the date of birth of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
business_intro: Optional[BusinessIntro] = None
"""*Optional*. For private chats with business accounts, the intro of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
business_location: Optional[BusinessLocation] = None
"""*Optional*. For private chats with business accounts, the location of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
business_opening_hours: Optional[BusinessOpeningHours] = None
"""*Optional*. For private chats with business accounts, the opening hours of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
personal_chat: Optional[Chat] = None
"""*Optional*. For private chats, the personal channel of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`."""
available_reactions: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None
"""*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`."""
accent_color_id: Optional[int] = None
@ -144,6 +158,11 @@ class Chat(TelegramObject):
is_forum: Optional[bool] = None,
photo: Optional[ChatPhoto] = None,
active_usernames: Optional[List[str]] = None,
birthdate: Optional[Birthdate] = None,
business_intro: Optional[BusinessIntro] = None,
business_location: Optional[BusinessLocation] = None,
business_opening_hours: Optional[BusinessOpeningHours] = None,
personal_chat: Optional[Chat] = None,
available_reactions: Optional[
List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]
] = None,
@ -190,6 +209,11 @@ class Chat(TelegramObject):
is_forum=is_forum,
photo=photo,
active_usernames=active_usernames,
birthdate=birthdate,
business_intro=business_intro,
business_location=business_location,
business_opening_hours=business_opening_hours,
personal_chat=personal_chat,
available_reactions=available_reactions,
accent_color_id=accent_color_id,
background_custom_emoji_id=background_custom_emoji_id,
@ -522,6 +546,7 @@ class Chat(TelegramObject):
def do(
self,
action: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
**kwargs: Any,
) -> SendChatAction:
@ -540,7 +565,8 @@ class Chat(TelegramObject):
Source: https://core.telegram.org/bots/api#sendchataction
:param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages <https://core.telegram.org/bots/api#sendmessage>`_, *upload_photo* for `photos <https://core.telegram.org/bots/api#sendphoto>`_, *record_video* or *upload_video* for `videos <https://core.telegram.org/bots/api#sendvideo>`_, *record_voice* or *upload_voice* for `voice notes <https://core.telegram.org/bots/api#sendvoice>`_, *upload_document* for `general files <https://core.telegram.org/bots/api#senddocument>`_, *choose_sticker* for `stickers <https://core.telegram.org/bots/api#sendsticker>`_, *find_location* for `location data <https://core.telegram.org/bots/api#sendlocation>`_, *record_video_note* or *upload_video_note* for `video notes <https://core.telegram.org/bots/api#sendvideonote>`_.
:param message_thread_id: Unique identifier for the target message thread; supergroups only
:param business_connection_id: Unique identifier of the business connection on behalf of which the action will be sent
:param message_thread_id: Unique identifier for the target message thread; for supergroups only
:return: instance of method :class:`aiogram.methods.send_chat_action.SendChatAction`
"""
# DO NOT EDIT MANUALLY!!!
@ -551,6 +577,7 @@ class Chat(TelegramObject):
return SendChatAction(
chat_id=self.id,
action=action,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
**kwargs,
).as_(self._bot)
@ -884,10 +911,10 @@ class Chat(TelegramObject):
:param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat
:param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users
:param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users
:param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; channels only
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; channels only
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages, supergroups only
:param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only
:param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only
:param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only
:param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only
:param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
:return: instance of method :class:`aiogram.methods.promote_chat_member.PromoteChatMember`
"""
# DO NOT EDIT MANUALLY!!!

View file

@ -38,13 +38,13 @@ class ChatAdministratorRights(TelegramObject):
can_delete_stories: bool
""":code:`True`, if the administrator can delete stories posted by other users"""
can_post_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; channels only"""
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only"""
can_edit_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only"""
can_pin_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only"""
"""*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only"""
can_manage_topics: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -157,6 +157,7 @@ class ChatJoinRequest(TelegramObject):
def answer(
self,
text: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
entities: Optional[List[MessageEntity]] = None,
@ -187,6 +188,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendmessage
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param parse_mode: Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
@ -194,7 +196,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param disable_web_page_preview: Disables link previews for links in this message
:param reply_to_message_id: If the message is a reply, ID of the original message
@ -208,6 +210,7 @@ class ChatJoinRequest(TelegramObject):
return SendMessage(
chat_id=self.chat.id,
text=text,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
parse_mode=parse_mode,
entities=entities,
@ -225,6 +228,7 @@ class ChatJoinRequest(TelegramObject):
def answer_pm(
self,
text: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
entities: Optional[List[MessageEntity]] = None,
@ -255,6 +259,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendmessage
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param parse_mode: Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
@ -262,7 +267,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param disable_web_page_preview: Disables link previews for links in this message
:param reply_to_message_id: If the message is a reply, ID of the original message
@ -276,6 +281,7 @@ class ChatJoinRequest(TelegramObject):
return SendMessage(
chat_id=self.user_chat_id,
text=text,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
parse_mode=parse_mode,
entities=entities,
@ -293,6 +299,7 @@ class ChatJoinRequest(TelegramObject):
def answer_animation(
self,
animation: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
@ -323,6 +330,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendanimation
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent animation in seconds
:param width: Animation width
@ -335,7 +343,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_animation.SendAnimation`
@ -348,6 +356,7 @@ class ChatJoinRequest(TelegramObject):
return SendAnimation(
chat_id=self.chat.id,
animation=animation,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
width=width,
@ -369,6 +378,7 @@ class ChatJoinRequest(TelegramObject):
def answer_animation_pm(
self,
animation: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
@ -399,6 +409,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendanimation
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent animation in seconds
:param width: Animation width
@ -411,7 +422,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_animation.SendAnimation`
@ -424,6 +435,7 @@ class ChatJoinRequest(TelegramObject):
return SendAnimation(
chat_id=self.user_chat_id,
animation=animation,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
width=width,
@ -445,6 +457,7 @@ class ChatJoinRequest(TelegramObject):
def answer_audio(
self,
audio: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -475,6 +488,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendaudio
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -486,7 +500,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_audio.SendAudio`
@ -499,6 +513,7 @@ class ChatJoinRequest(TelegramObject):
return SendAudio(
chat_id=self.chat.id,
audio=audio,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
@ -519,6 +534,7 @@ class ChatJoinRequest(TelegramObject):
def answer_audio_pm(
self,
audio: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -549,6 +565,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendaudio
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -560,7 +577,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_audio.SendAudio`
@ -573,6 +590,7 @@ class ChatJoinRequest(TelegramObject):
return SendAudio(
chat_id=self.user_chat_id,
audio=audio,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
@ -594,6 +612,7 @@ class ChatJoinRequest(TelegramObject):
self,
phone_number: str,
first_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
last_name: Optional[str] = None,
vcard: Optional[str] = None,
@ -619,13 +638,14 @@ class ChatJoinRequest(TelegramObject):
:param phone_number: Contact's phone number
:param first_name: Contact's first name
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard <https://en.wikipedia.org/wiki/VCard>`_, 0-2048 bytes
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_contact.SendContact`
@ -639,6 +659,7 @@ class ChatJoinRequest(TelegramObject):
chat_id=self.chat.id,
phone_number=phone_number,
first_name=first_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
last_name=last_name,
vcard=vcard,
@ -655,6 +676,7 @@ class ChatJoinRequest(TelegramObject):
self,
phone_number: str,
first_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
last_name: Optional[str] = None,
vcard: Optional[str] = None,
@ -680,13 +702,14 @@ class ChatJoinRequest(TelegramObject):
:param phone_number: Contact's phone number
:param first_name: Contact's first name
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard <https://en.wikipedia.org/wiki/VCard>`_, 0-2048 bytes
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_contact.SendContact`
@ -700,6 +723,7 @@ class ChatJoinRequest(TelegramObject):
chat_id=self.user_chat_id,
phone_number=phone_number,
first_name=first_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
last_name=last_name,
vcard=vcard,
@ -715,6 +739,7 @@ class ChatJoinRequest(TelegramObject):
def answer_document(
self,
document: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
caption: Optional[str] = None,
@ -742,6 +767,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#senddocument
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
@ -751,7 +777,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_document.SendDocument`
@ -764,6 +790,7 @@ class ChatJoinRequest(TelegramObject):
return SendDocument(
chat_id=self.chat.id,
document=document,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
thumbnail=thumbnail,
caption=caption,
@ -782,6 +809,7 @@ class ChatJoinRequest(TelegramObject):
def answer_document_pm(
self,
document: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
caption: Optional[str] = None,
@ -809,6 +837,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#senddocument
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
@ -818,7 +847,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_document.SendDocument`
@ -831,6 +860,7 @@ class ChatJoinRequest(TelegramObject):
return SendDocument(
chat_id=self.user_chat_id,
document=document,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
thumbnail=thumbnail,
caption=caption,
@ -849,6 +879,7 @@ class ChatJoinRequest(TelegramObject):
def answer_game(
self,
game_short_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
@ -869,11 +900,12 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendgame
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather <https://t.me/botfather>`_.
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_game.SendGame`
@ -886,6 +918,7 @@ class ChatJoinRequest(TelegramObject):
return SendGame(
chat_id=self.chat.id,
game_short_name=game_short_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
@ -899,6 +932,7 @@ class ChatJoinRequest(TelegramObject):
def answer_game_pm(
self,
game_short_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
@ -919,11 +953,12 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendgame
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather <https://t.me/botfather>`_.
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_game.SendGame`
@ -936,6 +971,7 @@ class ChatJoinRequest(TelegramObject):
return SendGame(
chat_id=self.user_chat_id,
game_short_name=game_short_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
@ -1170,6 +1206,7 @@ class ChatJoinRequest(TelegramObject):
self,
latitude: float,
longitude: float,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None,
@ -1197,6 +1234,7 @@ class ChatJoinRequest(TelegramObject):
:param latitude: Latitude of the location
:param longitude: Longitude of the location
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds for which the location will be updated (see `Live Locations <https://telegram.org/blog/live-locations>`_, should be between 60 and 86400.
@ -1205,7 +1243,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_location.SendLocation`
@ -1219,6 +1257,7 @@ class ChatJoinRequest(TelegramObject):
chat_id=self.chat.id,
latitude=latitude,
longitude=longitude,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
horizontal_accuracy=horizontal_accuracy,
live_period=live_period,
@ -1237,6 +1276,7 @@ class ChatJoinRequest(TelegramObject):
self,
latitude: float,
longitude: float,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None,
@ -1264,6 +1304,7 @@ class ChatJoinRequest(TelegramObject):
:param latitude: Latitude of the location
:param longitude: Longitude of the location
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds for which the location will be updated (see `Live Locations <https://telegram.org/blog/live-locations>`_, should be between 60 and 86400.
@ -1272,7 +1313,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_location.SendLocation`
@ -1286,6 +1327,7 @@ class ChatJoinRequest(TelegramObject):
chat_id=self.user_chat_id,
latitude=latitude,
longitude=longitude,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
horizontal_accuracy=horizontal_accuracy,
live_period=live_period,
@ -1303,6 +1345,7 @@ class ChatJoinRequest(TelegramObject):
def answer_media_group(
self,
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
@ -1322,6 +1365,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendmediagroup
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param disable_notification: Sends messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@ -1338,6 +1382,7 @@ class ChatJoinRequest(TelegramObject):
return SendMediaGroup(
chat_id=self.chat.id,
media=media,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
@ -1350,6 +1395,7 @@ class ChatJoinRequest(TelegramObject):
def answer_media_group_pm(
self,
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
@ -1369,6 +1415,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendmediagroup
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param disable_notification: Sends messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@ -1385,6 +1432,7 @@ class ChatJoinRequest(TelegramObject):
return SendMediaGroup(
chat_id=self.user_chat_id,
media=media,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
@ -1397,6 +1445,7 @@ class ChatJoinRequest(TelegramObject):
def answer_photo(
self,
photo: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -1423,6 +1472,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendphoto
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -1431,7 +1481,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_photo.SendPhoto`
@ -1444,6 +1494,7 @@ class ChatJoinRequest(TelegramObject):
return SendPhoto(
chat_id=self.chat.id,
photo=photo,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
@ -1461,6 +1512,7 @@ class ChatJoinRequest(TelegramObject):
def answer_photo_pm(
self,
photo: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -1487,6 +1539,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendphoto
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -1495,7 +1548,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_photo.SendPhoto`
@ -1508,6 +1561,7 @@ class ChatJoinRequest(TelegramObject):
return SendPhoto(
chat_id=self.user_chat_id,
photo=photo,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
@ -1526,6 +1580,7 @@ class ChatJoinRequest(TelegramObject):
self,
question: str,
options: List[str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
is_anonymous: Optional[bool] = None,
type: Optional[str] = None,
@ -1559,6 +1614,7 @@ class ChatJoinRequest(TelegramObject):
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
:param type: Poll type, 'quiz' or 'regular', defaults to 'regular'
@ -1573,7 +1629,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_poll.SendPoll`
@ -1587,6 +1643,7 @@ class ChatJoinRequest(TelegramObject):
chat_id=self.chat.id,
question=question,
options=options,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
is_anonymous=is_anonymous,
type=type,
@ -1611,6 +1668,7 @@ class ChatJoinRequest(TelegramObject):
self,
question: str,
options: List[str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
is_anonymous: Optional[bool] = None,
type: Optional[str] = None,
@ -1644,6 +1702,7 @@ class ChatJoinRequest(TelegramObject):
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
:param type: Poll type, 'quiz' or 'regular', defaults to 'regular'
@ -1658,7 +1717,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_poll.SendPoll`
@ -1672,6 +1731,7 @@ class ChatJoinRequest(TelegramObject):
chat_id=self.user_chat_id,
question=question,
options=options,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
is_anonymous=is_anonymous,
type=type,
@ -1694,6 +1754,7 @@ class ChatJoinRequest(TelegramObject):
def answer_dice(
self,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
@ -1716,12 +1777,13 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#senddice
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '', and values 1-64 for '🎰'. Defaults to '🎲'
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_dice.SendDice`
@ -1733,6 +1795,7 @@ class ChatJoinRequest(TelegramObject):
return SendDice(
chat_id=self.chat.id,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
@ -1746,6 +1809,7 @@ class ChatJoinRequest(TelegramObject):
def answer_dice_pm(
self,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
@ -1768,12 +1832,13 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#senddice
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '', and values 1-64 for '🎰'. Defaults to '🎲'
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_dice.SendDice`
@ -1785,6 +1850,7 @@ class ChatJoinRequest(TelegramObject):
return SendDice(
chat_id=self.user_chat_id,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
@ -1799,6 +1865,7 @@ class ChatJoinRequest(TelegramObject):
def answer_sticker(
self,
sticker: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
@ -1821,13 +1888,14 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendsticker
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL.
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_sticker.SendSticker`
@ -1840,6 +1908,7 @@ class ChatJoinRequest(TelegramObject):
return SendSticker(
chat_id=self.chat.id,
sticker=sticker,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
@ -1854,6 +1923,7 @@ class ChatJoinRequest(TelegramObject):
def answer_sticker_pm(
self,
sticker: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
@ -1876,13 +1946,14 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendsticker
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL.
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_sticker.SendSticker`
@ -1895,6 +1966,7 @@ class ChatJoinRequest(TelegramObject):
return SendSticker(
chat_id=self.user_chat_id,
sticker=sticker,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
@ -1912,6 +1984,7 @@ class ChatJoinRequest(TelegramObject):
longitude: float,
title: str,
address: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
foursquare_id: Optional[str] = None,
foursquare_type: Optional[str] = None,
@ -1941,6 +2014,7 @@ class ChatJoinRequest(TelegramObject):
:param longitude: Longitude of the venue
:param title: Name of the venue
:param address: Address of the venue
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
@ -1949,7 +2023,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_venue.SendVenue`
@ -1965,6 +2039,7 @@ class ChatJoinRequest(TelegramObject):
longitude=longitude,
title=title,
address=address,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
foursquare_id=foursquare_id,
foursquare_type=foursquare_type,
@ -1985,6 +2060,7 @@ class ChatJoinRequest(TelegramObject):
longitude: float,
title: str,
address: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
foursquare_id: Optional[str] = None,
foursquare_type: Optional[str] = None,
@ -2014,6 +2090,7 @@ class ChatJoinRequest(TelegramObject):
:param longitude: Longitude of the venue
:param title: Name of the venue
:param address: Address of the venue
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
@ -2022,7 +2099,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_venue.SendVenue`
@ -2038,6 +2115,7 @@ class ChatJoinRequest(TelegramObject):
longitude=longitude,
title=title,
address=address,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
foursquare_id=foursquare_id,
foursquare_type=foursquare_type,
@ -2055,6 +2133,7 @@ class ChatJoinRequest(TelegramObject):
def answer_video(
self,
video: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
@ -2086,6 +2165,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendvideo
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent video in seconds
:param width: Video width
@ -2099,7 +2179,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_video.SendVideo`
@ -2112,6 +2192,7 @@ class ChatJoinRequest(TelegramObject):
return SendVideo(
chat_id=self.chat.id,
video=video,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
width=width,
@ -2134,6 +2215,7 @@ class ChatJoinRequest(TelegramObject):
def answer_video_pm(
self,
video: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
@ -2165,6 +2247,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendvideo
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent video in seconds
:param width: Video width
@ -2178,7 +2261,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_video.SendVideo`
@ -2191,6 +2274,7 @@ class ChatJoinRequest(TelegramObject):
return SendVideo(
chat_id=self.user_chat_id,
video=video,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
width=width,
@ -2213,6 +2297,7 @@ class ChatJoinRequest(TelegramObject):
def answer_video_note(
self,
video_note: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
length: Optional[int] = None,
@ -2238,6 +2323,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendvideonote
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
@ -2245,7 +2331,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`
@ -2258,6 +2344,7 @@ class ChatJoinRequest(TelegramObject):
return SendVideoNote(
chat_id=self.chat.id,
video_note=video_note,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
length=length,
@ -2274,6 +2361,7 @@ class ChatJoinRequest(TelegramObject):
def answer_video_note_pm(
self,
video_note: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
length: Optional[int] = None,
@ -2299,6 +2387,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendvideonote
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
@ -2306,7 +2395,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`
@ -2319,6 +2408,7 @@ class ChatJoinRequest(TelegramObject):
return SendVideoNote(
chat_id=self.user_chat_id,
video_note=video_note,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
length=length,
@ -2335,6 +2425,7 @@ class ChatJoinRequest(TelegramObject):
def answer_voice(
self,
voice: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -2361,6 +2452,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendvoice
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -2369,7 +2461,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_voice.SendVoice`
@ -2382,6 +2474,7 @@ class ChatJoinRequest(TelegramObject):
return SendVoice(
chat_id=self.chat.id,
voice=voice,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
@ -2399,6 +2492,7 @@ class ChatJoinRequest(TelegramObject):
def answer_voice_pm(
self,
voice: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -2425,6 +2519,7 @@ class ChatJoinRequest(TelegramObject):
Source: https://core.telegram.org/bots/api#sendvoice
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -2433,7 +2528,7 @@ class ChatJoinRequest(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_voice.SendVoice`
@ -2446,6 +2541,7 @@ class ChatJoinRequest(TelegramObject):
return SendVoice(
chat_id=self.user_chat_id,
voice=voice,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,

View file

@ -45,13 +45,13 @@ class ChatMemberAdministrator(ChatMember):
can_delete_stories: bool
""":code:`True`, if the administrator can delete stories posted by other users"""
can_post_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; channels only"""
"""*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only"""
can_edit_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; channels only"""
"""*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only"""
can_pin_messages: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to pin messages; groups and supergroups only"""
"""*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only"""
can_manage_topics: Optional[bool] = None
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only"""
"""*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only"""
custom_title: Optional[str] = None
"""*Optional*. Custom title for this user"""

View file

@ -137,6 +137,7 @@ class ChatMemberUpdated(TelegramObject):
def answer(
self,
text: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
entities: Optional[List[MessageEntity]] = None,
@ -167,6 +168,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendmessage
:param text: Text of the message to be sent, 1-4096 characters after entities parsing
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param parse_mode: Mode for parsing entities in the message text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
:param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*
@ -174,7 +176,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param disable_web_page_preview: Disables link previews for links in this message
:param reply_to_message_id: If the message is a reply, ID of the original message
@ -188,6 +190,7 @@ class ChatMemberUpdated(TelegramObject):
return SendMessage(
chat_id=self.chat.id,
text=text,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
parse_mode=parse_mode,
entities=entities,
@ -205,6 +208,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_animation(
self,
animation: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
@ -235,6 +239,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendanimation
:param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent animation in seconds
:param width: Animation width
@ -247,7 +252,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_animation.SendAnimation`
@ -260,6 +265,7 @@ class ChatMemberUpdated(TelegramObject):
return SendAnimation(
chat_id=self.chat.id,
animation=animation,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
width=width,
@ -281,6 +287,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_audio(
self,
audio: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -311,6 +318,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendaudio
:param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Audio caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the audio caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -322,7 +330,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_audio.SendAudio`
@ -335,6 +343,7 @@ class ChatMemberUpdated(TelegramObject):
return SendAudio(
chat_id=self.chat.id,
audio=audio,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
@ -356,6 +365,7 @@ class ChatMemberUpdated(TelegramObject):
self,
phone_number: str,
first_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
last_name: Optional[str] = None,
vcard: Optional[str] = None,
@ -381,13 +391,14 @@ class ChatMemberUpdated(TelegramObject):
:param phone_number: Contact's phone number
:param first_name: Contact's first name
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param last_name: Contact's last name
:param vcard: Additional data about the contact in the form of a `vCard <https://en.wikipedia.org/wiki/VCard>`_, 0-2048 bytes
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_contact.SendContact`
@ -401,6 +412,7 @@ class ChatMemberUpdated(TelegramObject):
chat_id=self.chat.id,
phone_number=phone_number,
first_name=first_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
last_name=last_name,
vcard=vcard,
@ -416,6 +428,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_document(
self,
document: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
thumbnail: Optional[InputFile] = None,
caption: Optional[str] = None,
@ -443,6 +456,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#senddocument
:param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`
:param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing
@ -452,7 +466,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_document.SendDocument`
@ -465,6 +479,7 @@ class ChatMemberUpdated(TelegramObject):
return SendDocument(
chat_id=self.chat.id,
document=document,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
thumbnail=thumbnail,
caption=caption,
@ -483,6 +498,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_game(
self,
game_short_name: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
@ -503,11 +519,12 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendgame
:param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather <https://t.me/botfather>`_.
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
:param reply_markup: A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_game.SendGame`
@ -520,6 +537,7 @@ class ChatMemberUpdated(TelegramObject):
return SendGame(
chat_id=self.chat.id,
game_short_name=game_short_name,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
@ -644,6 +662,7 @@ class ChatMemberUpdated(TelegramObject):
self,
latitude: float,
longitude: float,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None,
@ -671,6 +690,7 @@ class ChatMemberUpdated(TelegramObject):
:param latitude: Latitude of the location
:param longitude: Longitude of the location
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
:param live_period: Period in seconds for which the location will be updated (see `Live Locations <https://telegram.org/blog/live-locations>`_, should be between 60 and 86400.
@ -679,7 +699,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_location.SendLocation`
@ -693,6 +713,7 @@ class ChatMemberUpdated(TelegramObject):
chat_id=self.chat.id,
latitude=latitude,
longitude=longitude,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
horizontal_accuracy=horizontal_accuracy,
live_period=live_period,
@ -710,6 +731,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_media_group(
self,
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[Union[bool, Default]] = Default("protect_content"),
@ -729,6 +751,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendmediagroup
:param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param disable_notification: Sends messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent messages from forwarding and saving
@ -745,6 +768,7 @@ class ChatMemberUpdated(TelegramObject):
return SendMediaGroup(
chat_id=self.chat.id,
media=media,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
@ -757,6 +781,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_photo(
self,
photo: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -783,6 +808,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendphoto
:param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the photo caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -791,7 +817,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_photo.SendPhoto`
@ -804,6 +830,7 @@ class ChatMemberUpdated(TelegramObject):
return SendPhoto(
chat_id=self.chat.id,
photo=photo,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
@ -822,6 +849,7 @@ class ChatMemberUpdated(TelegramObject):
self,
question: str,
options: List[str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
is_anonymous: Optional[bool] = None,
type: Optional[str] = None,
@ -855,6 +883,7 @@ class ChatMemberUpdated(TelegramObject):
:param question: Poll question, 1-300 characters
:param options: A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True`
:param type: Poll type, 'quiz' or 'regular', defaults to 'regular'
@ -869,7 +898,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_poll.SendPoll`
@ -883,6 +912,7 @@ class ChatMemberUpdated(TelegramObject):
chat_id=self.chat.id,
question=question,
options=options,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
is_anonymous=is_anonymous,
type=type,
@ -905,6 +935,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_dice(
self,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
@ -927,12 +958,13 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#senddice
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '', and values 1-64 for '🎰'. Defaults to '🎲'
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_dice.SendDice`
@ -944,6 +976,7 @@ class ChatMemberUpdated(TelegramObject):
return SendDice(
chat_id=self.chat.id,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
@ -958,6 +991,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_sticker(
self,
sticker: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
@ -980,13 +1014,14 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendsticker
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP or .TGS sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video stickers can only be sent by a file_id. Animated stickers can't be sent via an HTTP URL.
:param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Video and animated stickers can't be sent via an HTTP URL.
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param emoji: Emoji associated with the sticker; only for just uploaded stickers
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_sticker.SendSticker`
@ -999,6 +1034,7 @@ class ChatMemberUpdated(TelegramObject):
return SendSticker(
chat_id=self.chat.id,
sticker=sticker,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
@ -1016,6 +1052,7 @@ class ChatMemberUpdated(TelegramObject):
longitude: float,
title: str,
address: str,
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
foursquare_id: Optional[str] = None,
foursquare_type: Optional[str] = None,
@ -1045,6 +1082,7 @@ class ChatMemberUpdated(TelegramObject):
:param longitude: Longitude of the venue
:param title: Name of the venue
:param address: Address of the venue
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param foursquare_id: Foursquare identifier of the venue
:param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)
@ -1053,7 +1091,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_venue.SendVenue`
@ -1069,6 +1107,7 @@ class ChatMemberUpdated(TelegramObject):
longitude=longitude,
title=title,
address=address,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
foursquare_id=foursquare_id,
foursquare_type=foursquare_type,
@ -1086,6 +1125,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_video(
self,
video: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
@ -1117,6 +1157,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendvideo
:param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent video in seconds
:param width: Video width
@ -1130,7 +1171,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_video.SendVideo`
@ -1143,6 +1184,7 @@ class ChatMemberUpdated(TelegramObject):
return SendVideo(
chat_id=self.chat.id,
video=video,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
width=width,
@ -1165,6 +1207,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_video_note(
self,
video_note: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
length: Optional[int] = None,
@ -1190,6 +1233,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendvideonote
:param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Sending video notes by a URL is currently unsupported
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param duration: Duration of sent video in seconds
:param length: Video width and height, i.e. diameter of the video message
@ -1197,7 +1241,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote`
@ -1210,6 +1254,7 @@ class ChatMemberUpdated(TelegramObject):
return SendVideoNote(
chat_id=self.chat.id,
video_note=video_note,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
duration=duration,
length=length,
@ -1226,6 +1271,7 @@ class ChatMemberUpdated(TelegramObject):
def answer_voice(
self,
voice: Union[InputFile, str],
business_connection_id: Optional[str] = None,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[Union[str, Default]] = Default("parse_mode"),
@ -1252,6 +1298,7 @@ class ChatMemberUpdated(TelegramObject):
Source: https://core.telegram.org/bots/api#sendvoice
:param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`
:param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
:param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
:param caption: Voice message caption, 0-1024 characters after entities parsing
:param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.
@ -1260,7 +1307,7 @@ class ChatMemberUpdated(TelegramObject):
:param disable_notification: Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.
:param protect_content: Protects the contents of the sent message from forwarding and saving
:param reply_parameters: Description of the message to reply to
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.
:param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account
:param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found
:param reply_to_message_id: If the message is a reply, ID of the original message
:return: instance of method :class:`aiogram.methods.send_voice.SendVoice`
@ -1273,6 +1320,7 @@ class ChatMemberUpdated(TelegramObject):
return SendVoice(
chat_id=self.chat.id,
voice=voice,
business_connection_id=business_connection_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,

View file

@ -1,11 +1,16 @@
from typing import TYPE_CHECKING, Any
from __future__ import annotations
from typing import TYPE_CHECKING, Any, List, Optional
from aiogram.types import TelegramObject
if TYPE_CHECKING:
from .photo_size import PhotoSize
class ChatShared(TelegramObject):
"""
This object contains information about the chat whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.
This object contains information about a chat that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button.
Source: https://core.telegram.org/bots/api#chatshared
"""
@ -14,16 +19,36 @@ class ChatShared(TelegramObject):
"""Identifier of the request"""
chat_id: int
"""Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means."""
title: Optional[str] = None
"""*Optional*. Title of the chat, if the title was requested by the bot."""
username: Optional[str] = None
"""*Optional*. Username of the chat, if the username was requested by the bot and available."""
photo: Optional[List[PhotoSize]] = None
"""*Optional*. Available sizes of the chat photo, if the photo was requested by the bot"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, request_id: int, chat_id: int, **__pydantic_kwargs: Any
__pydantic__self__,
*,
request_id: int,
chat_id: int,
title: Optional[str] = None,
username: Optional[str] = None,
photo: Optional[List[PhotoSize]] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(request_id=request_id, chat_id=chat_id, **__pydantic_kwargs)
super().__init__(
request_id=request_id,
chat_id=chat_id,
title=title,
username=username,
photo=photo,
**__pydantic_kwargs,
)

View file

@ -20,21 +20,21 @@ class EncryptedPassportElement(TelegramObject):
hash: str
"""Base64-encoded element hash for using in :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`"""
data: Optional[str] = None
"""*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user, available for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
"""*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
phone_number: Optional[str] = None
"""*Optional*. User's verified phone number, available only for 'phone_number' type"""
"""*Optional*. User's verified phone number; available only for 'phone_number' type"""
email: Optional[str] = None
"""*Optional*. User's verified email address, available only for 'email' type"""
"""*Optional*. User's verified email address; available only for 'email' type"""
files: Optional[List[PassportFile]] = None
"""*Optional*. Array of encrypted files with documents provided by the user, available for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
"""*Optional*. Array of encrypted files with documents provided by the user; available only for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
front_side: Optional[PassportFile] = None
"""*Optional*. Encrypted file with the front side of the document, provided by the user. Available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
"""*Optional*. Encrypted file with the front side of the document, provided by the user; available only for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
reverse_side: Optional[PassportFile] = None
"""*Optional*. Encrypted file with the reverse side of the document, provided by the user. Available for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
"""*Optional*. Encrypted file with the reverse side of the document, provided by the user; available only for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
selfie: Optional[PassportFile] = None
"""*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
"""*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
translation: Optional[List[PassportFile]] = None
"""*Optional*. Array of encrypted files with translated versions of documents provided by the user. Available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
"""*Optional*. Array of encrypted files with translated versions of documents provided by the user; available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!

View file

@ -18,7 +18,7 @@ if TYPE_CHECKING:
class InlineQueryResultVoice(InlineQueryResult):
"""
Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the voice message.
Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the the voice message.
Source: https://core.telegram.org/bots/api#inlinequeryresultvoice
"""

View file

@ -18,6 +18,8 @@ class InputSticker(TelegramObject):
sticker: Union[InputFile, str]
"""The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » <sending-files>`"""
format: str
"""Format of the added sticker, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, 'video' for a **WEBM** video"""
emoji_list: List[str]
"""List of 1-20 emoji associated with the sticker"""
mask_position: Optional[MaskPosition] = None
@ -33,6 +35,7 @@ class InputSticker(TelegramObject):
__pydantic__self__,
*,
sticker: Union[InputFile, str],
format: str,
emoji_list: List[str],
mask_position: Optional[MaskPosition] = None,
keywords: Optional[List[str]] = None,
@ -44,6 +47,7 @@ class InputSticker(TelegramObject):
super().__init__(
sticker=sticker,
format=format,
emoji_list=emoji_list,
mask_position=mask_position,
keywords=keywords,

Some files were not shown because too many files have changed in this diff Show more