Interface MediaMessage

interface MediaMessage {
    author_signature?: string;
    business_connection_id?: string;
    caption?: string;
    caption_entities?: MessageEntity[];
    chat: Chat;
    date: number;
    edit_date?: number;
    effect_id?: string;
    external_reply?: ExternalReplyInfo;
    forward_origin?: MessageOrigin;
    from?: User;
    has_media_spoiler?: true;
    has_protected_content?: true;
    is_automatic_forward?: true;
    is_from_offline?: true;
    is_topic_message?: boolean;
    link_preview_options?: LinkPreviewOptions;
    media_group_id?: string;
    message_id: number;
    message_thread_id?: number;
    quote?: TextQuote;
    reply_markup?: InlineKeyboardMarkup;
    reply_to_message?: ReplyMessage;
    reply_to_story?: Story;
    sender_boost_count?: number;
    sender_business_bot?: User;
    sender_chat?: Chat;
    show_caption_above_media?: true;
    via_bot?: User;
}

Hierarchy (view full)

Properties

author_signature?: string

Signature of the post author for messages in channels, or the custom title of an anonymous group administrator

business_connection_id?: string

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.

caption?: string

Caption for the animation, audio, document, photo, video or voice

caption_entities?: MessageEntity[]

For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption

chat: Chat

Chat the message belongs to

date: number

Date the message was sent in Unix time. It is always a positive number, representing a valid date.

edit_date?: number

Date the message was last edited in Unix time

effect_id?: string

Unique identifier of the message effect added to the message

external_reply?: ExternalReplyInfo

Information about the message that is being replied to, which may come from another chat or forum topic

forward_origin?: MessageOrigin

Information about the original message for forwarded messages

from?: User

Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats

has_media_spoiler?: true

True, if the message media is covered by a spoiler animation

has_protected_content?: true

True, if the message can't be forwarded

is_automatic_forward?: true

True, if the message is a channel post that was automatically forwarded to the connected discussion group

is_from_offline?: true

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

is_topic_message?: boolean

True, if the message is sent to a forum topic

link_preview_options?: LinkPreviewOptions

Options used for link preview generation for the message, if it is a text message and link preview options were changed

media_group_id?: string

The unique identifier of a media message group this message belongs to

message_id: number

Unique message identifier inside this chat

message_thread_id?: number

Unique identifier of a message thread or a forum topic to which the message belongs; for supergroups only

quote?: TextQuote

For replies that quote part of the original message, the quoted part of the message

reply_markup?: InlineKeyboardMarkup

Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.

reply_to_message?: ReplyMessage

For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.

reply_to_story?: Story

For replies to a story, the original message

sender_boost_count?: number

If the sender of the message boosted the chat, the number of boosts added by the user

sender_business_bot?: User

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.

sender_chat?: Chat

Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.

show_caption_above_media?: true

True, if the caption must be shown above the message media

via_bot?: User

Bot through which the message was sent