- class telegram.ReplyParameters(message_id, chat_id=None, allow_sending_without_reply=None, quote=None, quote_parse_mode=None, quote_entities=None, quote_position=None, checklist_task_id=None, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObjectDescribes reply parameters for the message that is being sent.
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
message_idis equal.Use In
Added in version 20.8.
Changed in version 22.5: The
checklist_task_idparameter has been moved to the last position to maintain backward compatibility with versions prior to 22.4. This resolves a breaking change accidentally introduced in version 22.4. See the changelog for version 22.5 for more information.- Parameters:
message_id (
int) – Identifier of the message that will be replied to in the current chat, or in the chatchat_idif it is specified.chat_id (
int|str, optional) – If the message to be replied to is from a different chat, Unique identifier for the target chat or username of the target channel (in the format@channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats.allow_sending_without_reply (
bool, optional) – PassTrue, if the message should be sent even if the specified replied-to message is not found. Can be used only for replies in the same chat and forum topic.quote (
str, optional) – Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn’t found in the original message.quote_parse_mode (
str, optional) – Mode for parsing entities in the quote. See formatting options for more details.quote_entities (Sequence[
telegram.MessageEntity], optional) – A JSON-serialized list of special entities that appear in the quote. It can be specified instead ofquote_parse_mode.quote_position (
int, optional) – Position of the quote in the original message in UTF-16 code units.checklist_task_id (
int, optional) –Identifier of the specific checklist task to be replied to.
Added in version 22.4.
- message_id[source]¶
Identifier of the message that will be replied to in the current chat, or in the chat
chat_idif it is specified.- Type:
- chat_id[source]¶
Optional. If the message to be replied to is from a different chat, Unique identifier for the target chat or username of the target channel (in the format
@channelusername). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats.
- allow_sending_without_reply[source]¶
Optional. Pass
True, if the message should be sent even if the specified replied-to message is not found. Can be used only for replies in the same chat and forum topic.- Type:
- quote[source]¶
Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn’t found in the original message.
- Type:
- quote_parse_mode[source]¶
Optional. Mode for parsing entities in the quote. See formatting options for more details.
- Type:
- quote_entities[source]¶
Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of
quote_parse_mode.- Type:
tuple[
telegram.MessageEntity]
- quote_position[source]¶
Optional. Position of the quote in the original message in UTF-16 code units.
- Type:
- checklist_task_id[source]¶
Optional. Identifier of the specific checklist task to be replied to.
Added in version 22.4.
- Type:
ReplyParameters - python-telegram-bot v22.6