ReplyParameters

class aiogram.types.reply_parameters.ReplyParameters(*, message_id: int | None = None, chat_id: int | str | None = None, allow_sending_without_reply: bool | ~aiogram.client.default.Default | None = <Default('allow_sending_without_reply')>, quote: str | None = None, quote_parse_mode: str | ~aiogram.client.default.Default | None = <Default('parse_mode')>, quote_entities: list[~aiogram.types.message_entity.MessageEntity] | None = None, quote_position: int | None = None, checklist_task_id: int | None = None, poll_option_id: str | None = None, ephemeral_message_id: int | None = None, quote_rich_texts: list[RichTextUnion] | None = None, **extra_data: ~typing.Any)[source]

Describes reply parameters for the message that is being sent.

Source: https://core.telegram.org/bots/api#replyparameters

message_id: int | None

Optional. Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified. Required if ephemeral_message_id isn’t specified

chat_id: ChatIdUnion | None

Optional. If the message to be replied to is from a different chat, unique identifier for the chat or username of the bot, supergroup, or channel in the format @username. Not supported for messages sent on behalf of a business account, messages from channel direct messages chats and ephemeral messages

allow_sending_without_reply: bool | Default | None

Optional. 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, and sent ephemeral messages. Always True for messages sent on behalf of a business account

quote: str | None

Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities. The message will fail to send if the quote isn’t found in the original message. Ignored for ephemeral messages

quote_parse_mode: str | Default | None

Optional. Mode for parsing entities in the quote. See formatting options for more details

quote_entities: list[MessageEntity] | None

Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode

quote_position: int | None

Optional. Position of the quote in the original message in UTF-16 code units. For quotes from rich messages, it is the position in the text formed by joining plain texts of all quotable texts of the message, separated by line feeds

checklist_task_id: int | None

Optional. Identifier of the specific checklist task to be replied to

poll_option_id: str | None

Optional. Persistent identifier of the specific poll option to be replied to

ephemeral_message_id: int | None

Optional. Identifier of the incoming ephemeral message that will be replied to in the current chat. A reply to an ephemeral message must itself be an ephemeral message. An ephemeral message may only be replied to within 15 seconds of being sent. Required if message_id isn’t specified

quote_rich_texts: list[RichTextUnion] | None

Optional. A JSON-serialized list of quoted parts of the rich message to be replied to. Must contain one element for each quoted text of the message in the order of their appearance. Each of the following is a separate quoted text: the text of a paragraph, a heading, a preformatted block, a footer, or a mathematical expression; the text and the credit of a block quotation or a pull quotation; the summary of a details block; the caption and each cell of a table; the text and the credit of a caption of a media block, a collage, a slideshow, or a map. Texts of blocks nested in lists, block quotations, details, collages, and slideshows are separate quoted texts too. The first and the last elements can contain only a part of the corresponding text; all other elements must contain the whole text. Formatting of the quoted parts must be kept, and rich texts must be nested in the same way as in the message received from the server. Mathematical expressions must be quoted entirely. Buttons in aiogram.types.rich_block_buttons.RichBlockButtons, anchors and dividers can’t be quoted. Up to 32 quoted texts with total length up to 1024 characters can be specified. Only plain text, aiogram.types.rich_text_bold.RichTextBold, aiogram.types.rich_text_italic.RichTextItalic, aiogram.types.rich_text_underline.RichTextUnderline, aiogram.types.rich_text_strikethrough.RichTextStrikethrough, aiogram.types.rich_text_spoiler.RichTextSpoiler, aiogram.types.rich_text_subscript.RichTextSubscript, aiogram.types.rich_text_superscript.RichTextSuperscript, aiogram.types.rich_text_date_time.RichTextDateTime, aiogram.types.rich_text_custom_emoji.RichTextCustomEmoji, aiogram.types.rich_text_mathematical_expression.RichTextMathematicalExpression, and arrays of them are kept in the quote; other rich text types are replaced with their text. If non-empty, then quote, quote_parse_mode and quote_entities are ignored