Dev 3.x api 4.8 (#317)

* AIOG-T-20 Bot API 4.8

* AIOG-T-20 Update aliases

* AIOG-T-20 Add parse mode passing in sendPoll method

* AIOG-T-20 Small changes in docs

* AIOG-T-20 Revert overriding remove keyboard default value and add tests

* AIOG-T-20 Bot API 4.8
This commit is contained in:
Alex Root Junior 2020-05-02 23:01:32 +03:00 committed by GitHub
parent 15bcc0ba9f
commit 6be0b36305
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
104 changed files with 312 additions and 175 deletions

View file

@ -12,13 +12,13 @@ This object contains information about one member of a chat.
| `user` | `#!python User` | Information about the user |
| `status` | `#!python str` | The member's status in the chat. Can be 'creator', 'administrator', 'member', 'restricted', 'left' or 'kicked' |
| `custom_title` | `#!python Optional[str]` | Optional. Owner and administrators only. Custom title for this user |
| `until_date` | `#!python Optional[Union[int, datetime.datetime, datetime.timedelta]]` | Optional. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time |
| `until_date` | `#!python Optional[Union[datetime.datetime, datetime.timedelta, int]]` | Optional. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time |
| `can_be_edited` | `#!python Optional[bool]` | Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user |
| `can_post_messages` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can post in the channel; channels only |
| `can_edit_messages` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can edit messages of other users and can pin messages; channels only |
| `can_delete_messages` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can delete messages of other users |
| `can_restrict_members` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members |
| `can_promote_members` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) |
| `can_promote_members` | `#!python Optional[bool]` | Optional. Administrators only. True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) |
| `can_change_info` | `#!python Optional[bool]` | Optional. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings |
| `can_invite_users` | `#!python Optional[bool]` | Optional. Administrators and restricted only. True, if the user is allowed to invite new users to the chat |
| `can_pin_messages` | `#!python Optional[bool]` | Optional. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only |

View file

@ -2,14 +2,15 @@
## Description
This object represents a dice with random value from 1 to 6. (Yes, we're aware of the 'proper' singular of die. But it's awkward, and we decided to help it change. One dice at a time!)
This object represents a dice with a random value from 1 to 6 for currently supported base emoji. (Yes, we're aware of the 'proper' singular of die. But it's awkward, and we decided to help it change. One dice at a time!)
## Attributes
| Name | Type | Description |
| - | - | - |
| `value` | `#!python int` | Value of the dice, 1-6 |
| `emoji` | `#!python str` | Emoji on which the dice throw animation is based |
| `value` | `#!python int` | Value of the dice, 1-6 for currently supported base emoji |

View file

@ -14,7 +14,7 @@ This object represents one button of an inline keyboard. You must use exactly on
| `login_url` | `#!python Optional[LoginUrl]` | Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. |
| `callback_data` | `#!python Optional[str]` | Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes |
| `switch_inline_query` | `#!python Optional[str]` | Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bots username and the specified inline query in the input field. Can be empty, in which case just the bots username will be inserted. |
| `switch_inline_query_current_chat` | `#!python Optional[str]` | Optional. If set, pressing the button will insert the bots username and the specified inline query in the current chat's input field. Can be empty, in which case only the bots username will be inserted. |
| `switch_inline_query_current_chat` | `#!python Optional[str]` | Optional. If set, pressing the button will insert the bots username and the specified inline query in the current chats input field. Can be empty, in which case only the bot's username will be inserted. |
| `callback_game` | `#!python Optional[CallbackGame]` | Optional. Description of the game that will be launched when the user presses the button. |
| `pay` | `#!python Optional[bool]` | Optional. Specify True, to send a Pay button. |

View file

@ -16,7 +16,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
| `audio_url` | `#!python str` | A valid URL for the audio file |
| `title` | `#!python str` | Title |
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the audio caption. See formatting options for more details. |
| `performer` | `#!python Optional[str]` | Optional. Performer |
| `audio_duration` | `#!python Optional[int]` | Optional. Audio duration in seconds |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |

View file

@ -15,7 +15,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
| `id` | `#!python str` | Unique identifier for this result, 1-64 bytes |
| `audio_file_id` | `#!python str` | A valid file identifier for the audio file |
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the audio caption. See formatting options for more details. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the audio |

View file

@ -17,7 +17,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
| `document_file_id` | `#!python str` | A valid file identifier for the file |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the document to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the document caption. See formatting options for more details. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the file |

View file

@ -14,7 +14,7 @@ Represents a link to an animated GIF file stored on the Telegram servers. By def
| `gif_file_id` | `#!python str` | A valid file identifier for the GIF file |
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the caption. See formatting options for more details. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the GIF animation |

View file

@ -14,7 +14,7 @@ Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) st
| `mpeg4_file_id` | `#!python str` | A valid file identifier for the MP4 file |
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the caption. See formatting options for more details. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the video animation |

View file

@ -15,7 +15,7 @@ Represents a link to a photo stored on the Telegram servers. By default, this ph
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the photo caption. See formatting options for more details. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the photo |

View file

@ -15,7 +15,7 @@ Represents a link to a video file stored on the Telegram servers. By default, th
| `title` | `#!python str` | Title for the result |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the video to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the video caption. See formatting options for more details. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the video |

View file

@ -16,7 +16,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
| `voice_file_id` | `#!python str` | A valid file identifier for the voice message |
| `title` | `#!python str` | Voice message title |
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the voice message caption. See formatting options for more details. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the voice message |

View file

@ -17,7 +17,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
| `document_url` | `#!python str` | A valid URL for the file |
| `mime_type` | `#!python str` | Mime type of the content of the file, either 'application/pdf' or 'application/zip' |
| `caption` | `#!python Optional[str]` | Optional. Caption of the document to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the document caption. See formatting options for more details. |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the file |

View file

@ -18,7 +18,7 @@ Represents a link to an animated GIF file. By default, this animated GIF file wi
| `gif_duration` | `#!python Optional[int]` | Optional. Duration of the GIF |
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the caption. See formatting options for more details. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the GIF animation |

View file

@ -18,7 +18,7 @@ Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). B
| `mpeg4_duration` | `#!python Optional[int]` | Optional. Video duration |
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the caption. See formatting options for more details. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the video animation |

View file

@ -18,7 +18,7 @@ Represents a link to a photo. By default, this photo will be sent by the user wi
| `title` | `#!python Optional[str]` | Optional. Title for the result |
| `description` | `#!python Optional[str]` | Optional. Short description of the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the photo caption. See formatting options for more details. |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the photo |

View file

@ -18,7 +18,7 @@ If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube),
| `thumb_url` | `#!python str` | URL of the thumbnail (jpeg only) for the video |
| `title` | `#!python str` | Title for the result |
| `caption` | `#!python Optional[str]` | Optional. Caption of the video to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the video caption. See formatting options for more details. |
| `video_width` | `#!python Optional[int]` | Optional. Video width |
| `video_height` | `#!python Optional[int]` | Optional. Video height |
| `video_duration` | `#!python Optional[int]` | Optional. Video duration in seconds |

View file

@ -16,7 +16,7 @@ Note: This will only work in Telegram versions released after 9 April, 2016. Old
| `voice_url` | `#!python str` | A valid URL for the voice recording |
| `title` | `#!python str` | Recording title |
| `caption` | `#!python Optional[str]` | Optional. Caption, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the voice message caption. See formatting options for more details. |
| `voice_duration` | `#!python Optional[int]` | Optional. Recording duration in seconds |
| `reply_markup` | `#!python Optional[InlineKeyboardMarkup]` | Optional. Inline keyboard attached to the message |
| `input_message_content` | `#!python Optional[InputMessageContent]` | Optional. Content of the message to be sent instead of the voice recording |

View file

@ -13,7 +13,7 @@ Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be
| `media` | `#!python Union[str, InputFile]` | File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. |
| `thumb` | `#!python Optional[Union[InputFile, str]]` | Optional. 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 thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant 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>. |
| `caption` | `#!python Optional[str]` | Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the animation caption. See formatting options for more details. |
| `width` | `#!python Optional[int]` | Optional. Animation width |
| `height` | `#!python Optional[int]` | Optional. Animation height |
| `duration` | `#!python Optional[int]` | Optional. Animation duration |

View file

@ -13,7 +13,7 @@ Represents an audio file to be treated as music to be sent.
| `media` | `#!python Union[str, InputFile]` | File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. |
| `thumb` | `#!python Optional[Union[InputFile, str]]` | Optional. 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 thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant 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>. |
| `caption` | `#!python Optional[str]` | Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the audio caption. See formatting options for more details. |
| `duration` | `#!python Optional[int]` | Optional. Duration of the audio in seconds |
| `performer` | `#!python Optional[str]` | Optional. Performer of the audio |
| `title` | `#!python Optional[str]` | Optional. Title of the audio |

View file

@ -13,7 +13,7 @@ Represents a general file to be sent.
| `media` | `#!python Union[str, InputFile]` | File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. |
| `thumb` | `#!python Optional[Union[InputFile, str]]` | Optional. 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 thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant 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>. |
| `caption` | `#!python Optional[str]` | Optional. Caption of the document to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the document caption. See formatting options for more details. |

View file

@ -12,7 +12,7 @@ Represents a photo to be sent.
| `type` | `#!python str` | Type of the result, must be photo |
| `media` | `#!python Union[str, InputFile]` | File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. |
| `caption` | `#!python Optional[str]` | Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the photo caption. See formatting options for more details. |

View file

@ -13,7 +13,7 @@ Represents a video to be sent.
| `media` | `#!python Union[str, InputFile]` | File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. |
| `thumb` | `#!python Optional[Union[InputFile, str]]` | Optional. 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 thumbnails width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails cant 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>. |
| `caption` | `#!python Optional[str]` | Optional. Caption of the video to be sent, 0-1024 characters after entities parsing |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the video caption. See formatting options for more details. |
| `width` | `#!python Optional[int]` | Optional. Video width |
| `height` | `#!python Optional[int]` | Optional. Video height |
| `duration` | `#!python Optional[int]` | Optional. Video duration |

View file

@ -10,7 +10,7 @@ Represents the content of a text message to be sent as the result of an inline q
| Name | Type | Description |
| - | - | - |
| `message_text` | `#!python str` | Text of the message to be sent, 1-4096 characters |
| `parse_mode` | `#!python Optional[str]` | Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. |
| `parse_mode` | `#!python Optional[str]` | Optional. Mode for parsing entities in the message text. See formatting options for more details. |
| `disable_web_page_preview` | `#!python Optional[bool]` | Optional. Disables link previews for links in the sent message |

View file

@ -18,6 +18,10 @@ This object contains information about a poll.
| `type` | `#!python str` | Poll type, currently can be 'regular' or 'quiz' |
| `allows_multiple_answers` | `#!python bool` | True, if the poll allows multiple answers |
| `correct_option_id` | `#!python Optional[int]` | Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot. |
| `explanation` | `#!python Optional[str]` | Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters |
| `explanation_entities` | `#!python Optional[List[MessageEntity]]` | Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the explanation |
| `open_period` | `#!python Optional[int]` | Optional. Amount of time in seconds the poll will be active after creation |
| `close_date` | `#!python Optional[Union[datetime.datetime, datetime.timedelta, int]]` | Optional. Point in time (Unix timestamp) when the poll will be automatically closed |
@ -30,4 +34,5 @@ This object contains information about a poll.
## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#poll)
- [aiogram.types.MessageEntity](../types/message_entity.md)
- [aiogram.types.PollOption](../types/poll_option.md)