Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IMessage

This object represents a message.

Hierarchy

  • IMessage

Index

Properties

animation?: IAnimation

Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set

audio?: IAudio

Optional. Message is an audio file, information about the file

author_signature?: string

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

boost_added?: IChatBoostAdded

Optional. Service message: user boosted the chat

business_connection_id?: string

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.

caption?: string

Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters

caption_entities?: IMessageEntity[]

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

channel_chat_created?: boolean

Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.

chat: IChat

Conversation the message belongs to

chat_background_set?: IChatBackground

Optional. Service message: chat background set

chat_shared?: IChatShared

Optional. Service message: a chat was shared with the bot

connected_website?: string

Optional. The domain name of the website on which the user has logged in

contact?: IContact

Optional. Message is a shared contact, information about the contact

date: number

Date the message was sent in Unix time

delete_chat_photo?: boolean

Optional. Service message: the chat photo was deleted

dice?: IDice

Optional. Message is a dice with random value

document?: IDocument

Optional. Message is a general file, information about the file

edit_date?: number

Optional. Date the message was last edited in Unix time

effect_id?: string

Optional. Unique identifier of the message effect added to the message

entities?: IMessageEntity[]

Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text

external_reply?: IExternalReplyInfo

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

forum_topic_closed?: IForumTopicClosed

Optional. Service message: forum topic closed

forum_topic_created?: IForumTopicCreated

Optional. Service message: forum topic created

forum_topic_edited?: IForumTopicEdited

Optional. Service message: forum topic edited

forum_topic_reopened?: IForumTopicReopened

Optional. Service message: forum topic reopened

forward_date: number

Optional. For forwarded messages, date the original message was sent in Unix time

forward_from: IUser

Optional. For forwarded messages, sender of the original message

forward_from_chat: IChat

Optional. For messages forwarded from channels or from anonymous administrators, information about the original sender chat

forward_from_message_id: number

Optional. For messages forwarded from channels, identifier of the original message in the channel

forward_origin?: IMessageOrigin

Optional. Information about the original message for forwarded messages

forward_sender_name: string

Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages

forward_signature: string

Optional. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present

from?: IUser

Optional. Sender of the message; empty for messages sent to channels.

game?: IGame

Optional. Message is a game, information about the game. More about games »

general_forum_topic_hidden?: IGeneralForumTopicHidden

Optional. Service message: the 'General' forum topic hidden

general_forum_topic_unhidden?: IGeneralForumTopicUnhidden

Optional. Service message: the 'General' forum topic unhidden

giveaway?: IGiveaway

Optional. The message is a scheduled giveaway message

giveaway_completed?: IGiveawayCompleted

Optional. Service message: a giveaway without public winners was completed

giveaway_created?: IGiveawayCreated

Optional. Service message: a scheduled giveaway was created

giveaway_winners?: IGiveawayWinners

Optional. A giveaway with public winners was completed

group_chat_created?: boolean

Optional. Service message: the group has been created

has_media_spoiler?: boolean

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

has_protected_content?: boolean

Optional. True, if the message can't be forwarded

invoice?: IInvoice

Optional. Message is an invoice for a payment, information about the invoice.

is_automatic_forward?: boolean

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

is_from_offline: boolean

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

is_topic_message?: boolean

Optional. True, if the message is sent to a forum topic

left_chat_member?: IUser

Optional. A member was removed from the group, information about them (this member may be the bot itself)

link_preview_options?: ILinkPreviewOptions

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

location?: ILocation

Optional. Message is a shared location, information about the location

media_group_id?: string

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

message_auto_delete_timer_changed?: IMessageAutoDeleteTimerChanged

Optional. Service message: auto-delete timer settings changed in the chat

message_id: number

Unique message identifier inside this chat

message_thread_id?: number

Optional. Unique identifier of a message thread to which the message belongs; for supergroups only

migrate_from_chat_id?: number

Optional. The supergroup has been migrated from a group with the specified identifier. 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 signed 64-bit integer or double-precision float type are safe for storing this identifier.

migrate_to_chat_id?: number

Optional. The group has been migrated to a supergroup with the specified identifier. 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 signed 64-bit integer or double-precision float type are safe for storing this identifier.

new_chat_members?: IUser[]

Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)

new_chat_photo?: IPhotoSize[]

Optional. A chat photo was change to this value

new_chat_title?: string

Optional. A chat title was changed to this value

paid_media?: IPaidMediaInfo

Optional. Message contains paid media; information about the paid media

passport_data: IPassportData

Optional. Telegram Passport data

photo?: IPhotoSize[]

Optional. Message is a photo, available sizes of the photo

pinned_message?: IMaybeInaccessibleMessage

Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply

poll?: IPoll

Optional. Message is a native poll, information about the poll

proximity_alert_triggered: IProximityAlertTriggered

Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.

quote?: ITextQuote

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

refunded_payment?: IRefundedPayment

Optional. Message is a service message about a refunded payment, information about the payment. More about payments »

reply_markup: IInlineKeyboardMarkup

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

reply_to_message: IMessage

Optional. For replies, 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?: IStory

Optional. For replies to a story, the original story

sender_boost_count?: number

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

sender_business_bot?: IUser

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.

sender_chat?: IChat

Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group

show_caption_above_media?: boolean

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

sticker?: ISticker

Optional. Message is a sticker, information about the sticker

story?: IStory

Optional. Message is a forwarded story

successful_payment?: ISuccessfulPayment

Optional. Message is a service message about a successful payment, information about the payment.

supergroup_chat_created?: boolean

Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.

text?: string

Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters

users_shared?: IUserShared

Optional. Service message: users were shared with the bot

venue?: IVenue

Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set

via_bot?: IUser

Optional. Bot through which the message was sent

video?: IVideo

Optional. Message is a video, information about the video

video_chat_ended: IVoiceChatEnded

Optional. Service message: voice chat ended

video_chat_participants_invited: IVoiceChatParticipantsInvited

Optional. Service message: new participants invited to a voice chat

video_chat_scheduled?: IVoiceChatScheduled

Optional. Service message: voice chat scheduled

video_chat_started: IVoiceChatStarted

Optional. Service message: voice chat started

video_note?: IVideoNote

Optional. Message is a video note, information about the video message

voice?: IVoice

Optional. Message is a voice message, information about the file

web_app_data?: IWebAppData

Optional. Service message: data sent by a Web App

write_access_allowed?: IWriteAccessAllowed

Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess

Generated using TypeDoc