Message
This object represents a message.
Properties
message_id
(int
): Unique message identifier inside this chatdate
(int
): Date the message was sent in Unix timechat
(Chat): Conversation the message belongs tomessage_thread_id
(int
): Optional. Unique identifier of a message thread to which the message belongs; for supergroups onlyfrom_user
(User): Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.sender_chat
(Chat): 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. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.sender_boost_count
(int
): Optional. If the sender of the message boosted the chat, the number of boosts added by the usersender_business_bot
(User)business_connection_id
(str
): 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.forward_origin
(MessageOrigin
)is_topic_message
(bool
): Optional. True, if the message is sent to a forum topicis_automatic_forward
(bool
): Optional. :obj:bool
, if the message is a channel post that was automatically forwarded to the connected discussion groupreply_to_message
(Message): 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.external_reply
(ExternalReplyInfo): Optional. Information about the message that is being replied to, which may come from another chat or forum topicquote
(TextQuote): Optional. For replies that quote part of the original message, the quoted part of the messagereply_to_story
(Story): Optional. For replies to a story, the original storyvia_bot
(User): Optional. Bot through which the message was sentedit_date
(int
): Optional. Date the message was last edited in Unix timehas_protected_content
(bool
): Optional. :obj:bool
, if the message can't be forwardedis_from_offline
(bool
): 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 messagemedia_group_id
(str
): Optional. The unique identifier of a media message group this message belongs toauthor_signature
(str
): Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administratortext
(String
): Optional. For text messages, the actual UTF-8 text of the messageentities
(List of MessageEntity): Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the textlink_preview_options
(LinkPreviewOptions): Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changedeffect_id
(str
): Optional. Unique identifier of the message effect added to the messageanimation
(Animation): Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be setaudio
(Audio): Optional. Message is an audio file, information about the filedocument
(Document): Optional. Message is a general file, information about the filepaid_media
(PaidMediaInfo)photo
(List of PhotoSize): Optional. Message is a photo, available sizes of the photosticker
(Sticker): Optional. Message is a sticker, information about the stickerstory
(Story): Optional. Message is a forwarded storyvideo
(Video): Optional. Message is a video, information about the videovideo_note
(VideoNote): Optional. Message is a video note, information about the video messagevoice
(Voice): Optional. Message is a voice message, information about the filecaption
(String
): Optional. Caption for the animation, audio, document, photo, video or voicecaption_entities
(List of MessageEntity): Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the captionshow_caption_above_media
(bool
): Optional. True, if the caption must be shown above the message mediahas_media_spoiler
(bool
): Optional. True, if the message media is covered by a spoiler animationchecklist
(Checklist): Optional. Message is a checklistcontact
(Contact): Optional. Message is a shared contact, information about the contactdice
(Dice): Optional. Message is a dice with random valuegame
(Game): Optional. Message is a game, information about the game. More about games »poll
(Poll): Optional. Message is a native poll, information about the pollvenue
(Venue): Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be setlocation
(Location): Optional. Message is a shared location, information about the locationnew_chat_members
(List of User): Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)left_chat_member
(User): Optional. A member was removed from the group, information about them (this member may be the bot itself)new_chat_title
(str
): Optional. A chat title was changed to this valuenew_chat_photo
(List of PhotoSize): Optional. A chat photo was change to this valuedelete_chat_photo
(bool
): Optional. Service message: the chat photo was deletedgroup_chat_created
(bool
): Optional. Service message: the group has been createdsupergroup_chat_created
(bool
): 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.channel_chat_created
(bool
): 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.message_auto_delete_timer_changed
(MessageAutoDeleteTimerChanged): Optional. Service message: auto-delete timer settings changed in the chatmigrate_to_chat_id
(int
): 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.migrate_from_chat_id
(int
): 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.pinned_message
(Message): 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.invoice
(Invoice): Optional. Message is an invoice for a payment, information about the invoice. More about payments »successful_payment
(SuccessfulPayment): Optional. Message is a service message about a successful payment, information about the payment. More about payments »refunded_payment
(RefundedPayment)users_shared
(UsersShared): Optional. Service message: a user was shared with the botchat_shared
(ChatShared): Optional. Service message: a chat was shared with the botgift
(GiftInfo): Optional. Service message: a regular gift was sent or received :type gift: :class:tgram.types.GiftInfo
unique_gift
(UniqueGiftInfo): Optional. Service message: a unique gift was sent or receivedconnected_website
(str
): Optional. The domain name of the website on which the user has logged in. More about Telegram Login »write_access_allowed
(WriteAccessAllowed): Optional. Service message: the user allowed the bot added to the attachment menu to write messagespassport_data
(PassportData): Optional. Telegram Passport dataproximity_alert_triggered
(ProximityAlertTriggered): Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.boost_added
(ChatBoostAdded): Optional. Service message: user boosted the chatchat_background_set
(ChatBackground): Optional. Service message: chat background setchecklist_tasks_done
(ChecklistTasksDone): Optional. Service message: some tasks in a checklist were marked as done or not donechecklist_tasks_added
(ChecklistTasksAdded): Optional. Service message: tasks were added to a checklistdirect_message_price_changed
(DirectMessagePriceChanged): Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changedforum_topic_created
(ForumTopicCreated): Optional. Service message: forum topic createdforum_topic_edited
(ForumTopicEdited): Optional. Service message: forum topic editedforum_topic_closed
(ForumTopicClosed): Optional. Service message: forum topic closedforum_topic_reopened
(ForumTopicReopened): Optional. Service message: forum topic reopenedgeneral_forum_topic_hidden
(GeneralForumTopicHidden): Optional. Service message: the 'General' forum topic hiddengeneral_forum_topic_unhidden
(GeneralForumTopicUnhidden): Optional. Service message: the 'General' forum topic unhiddengiveaway_created
(GiveawayCreated): Optional. Service message: a giveaway has been createdgiveaway
(Giveaway): Optional. The message is a scheduled giveaway messagegiveaway_winners
(GiveawayWinners): Optional. Service message: giveaway winners(public winners)giveaway_completed
(GiveawayCompleted): Optional. Service message: giveaway completed, without public winnerspaid_message_price_changed
(PaidMessagePriceChanged): Optional. Service message: the price for paid messages has changed in the chatvideo_chat_scheduled
(VideoChatScheduled): Optional. Service message: video chat scheduledvideo_chat_started
(VideoChatStarted): Optional. Service message: video chat startedvideo_chat_ended
(VideoChatEnded): Optional. Service message: video chat endedvideo_chat_participants_invited
(VideoChatParticipantsInvited): Optional. Service message: new participants invited to a video chatweb_app_data
(WebAppData): Optional. Service message: data sent by a Web Appreply_markup
(InlineKeyboardMarkup): Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.